Hi Mohammad! > This patch fixes the multiple concurrency failure in fastcgi > (against rev. 128). Alo's previous patch sent to the list also > included in this patch (Yes, Alo, you were right. It is better to > have integer, not the pointer). The cause of the failure was because > the manager relied on fcgi->id sent by the handler: > > in read_fcgi(): > return cherokee_fcgi_manager_step (fcgim, fcgi); > > In fact, all data that received by the manager from the server have > nothing to do with the current fcgi handler. Error happened under > certain circumstance when the manager received END_QUERY for fcgi->id = > X, but the current fcgi->id in the manager was Y. Hence, the manager > will set the fcgi->phase of Y to 'finished' while it should not be (it > should be X that is set to finished, not Y). Then, the Y manager found > out that it should be finished while the incoming_buffer is still empty. > > This patch fixes the problem by resolving the current fcgi->id based on > the record found inside the data coming from the server instead of > getting it from the handler. Therefore, the manager could set the phase > and fill the incoming_buffer for the correct (fcgi->id) handler.
Good stuff, this is actually great job!! :-) The patch is applied: http://www.0x50.org/bugs/changeset/140 > After applying the patch, there is still a problem: I could never > get 'ab -c 1 -n 1000' completed successfully because exactly in > 501th request, the php interpreter always crashed (probably out of > our scope, ie. PHP/libfcgi bug) Yeah, I got the same result yesterday. I will try to figure out what is happening with PHP interpreter. We are on the way, now we are a step nearer to get the FastCGI working alright, and hence to the 0.5.0 release! :-) -- Greetings, alo. http://www.alobbs.com _______________________________________________ Cherokee mailing list Cherokee@lists.alobbs.com http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee