Does cowboy use process pool? #281

Closed
sinnus opened this Issue Oct 10, 2012 · 9 comments

2 participants

@sinnus

Does cowboy use process pool to process http/websocket/loop handlers?

@essen
Nine Nines member

It has an acceptor pool to accept connections and a connection pool for running connections. But the processes themselves are entirely independent.

@sinnus

I logged self() in init and terminate handler and see the second request has the same pid() as the first request. As I can understand if I start timer in init() I should cancel it in terminate handler. Right?

@essen
Nine Nines member

Good point.

This can happen when requests are sent over the same connection with keep-alive.

I probably should explain that in the documentation.

@sinnus sinnus referenced this issue in sinnus/socket.io-cowboy Oct 10, 2012
Closed

Stress test fail on 1000000 messages #10

@sinnus

It should be good to have right example of long polling in documentation with cancellation of timer.

@sinnus sinnus closed this Oct 10, 2012
@essen
Nine Nines member

I'll leave this open to check everything out on this.

@essen essen reopened this Oct 10, 2012
@sinnus

One more question. If exception is occurred in loop handler does it mean that a process will be terminated or it will live for reuse (in keep-alive case).

@essen
Nine Nines member

If any unexpected error happens it is terminated.

@essen
Nine Nines member

Put myself a note in the guide draft, to explain these things.

@essen essen closed this Dec 1, 2012
@essen
Nine Nines member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment