Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Little doc fix, plus potential fix for serious issue in case of checkout_blocks=true and long running workers #2

Merged
merged 2 commits into from Sep 30, 2011

Conversation

Projects
None yet
3 participants

niksite commented Sep 15, 2011

  1. Fixed pool spec in README file (it should be 'size' variable, not 'pool_size').
  2. Fixed bad behavior in case of checkout_blocks=true and long running workers:

E.g., I have created pool with some long-running workerks.
Now, I starting checking out those workers:

1> poolboy:checkout(pool1).
<0.371.0>
2> poolboy:checkout(pool1).
<0.372.0>
...
12> poolboy:checkout(pool1).
<0.1546.25>
13> poolboy:checkout(pool1).
** exception exit: {timeout,{gen_fsm,sync_send_event,[pool1,checkout]}}
in function gen_fsm:sync_send_event/2

As you may see, when we have no more workers, the "poolboy:checkout(pool1)." is blocked for about 5 seconds, then it return timeout error and DROP ALL WORKERS. Why?
I have added timeout specification as 'infinity' which may resolve this issue.

Nikolay A. Panov and others added some commits Sep 15, 2011

1. Fixed pool spec in README file (it should be 'size' variable, not …
…'pool_size').

2. Fixed bad behavior in case of checkout_blocks=true and long running workers.
Owner

devinus commented Sep 30, 2011

Looking into this...

@devinus devinus merged commit 055db72 into devinus:master Sep 30, 2011

devinus pushed a commit that referenced this pull request Sep 30, 2011

Try to address issue #2 with an optional timeout paramenter on checko…
…ut (default: 5000)

Some people value the let-it-fail philosophy which would allow the pool to fail when it can't send the event in time. Others may want to mimic a wholly blocking interface with infinity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment