Yo'av Moshe wrote: > Hey, > Anyone seen this behavior? Any ideas on what to check? > As I said, I'm pretty sure something has changed with Cherokee between > 0.99.20 to 0.99.21 that causes these "502 Bad Gateway" errors. > > My server is a production server and I'm right now it's not quite > working as it should... :-p >
Yo'av, don't know enough about your setup, sorry, joined list just today. But, from some extensive testing I did few days ago, I know one thing. Using UNIX sockets for communication between cherokee and php-cgi farm is very fragile. At some point in time, under high load, php-cgi's become unresponsive and cherokee starts retunring 504 Gateway timeout. To make matters worse, the problem won't remedy itself, full restart (cherokee + php-cgi) is required to fix it. Now, I don't know the cause of the problem, it might be even in kernel (some race condition in socket code under high load), php-cgi mechanism or the way cherokee communicates with it... What I do know is that using TCP/IP sockets for the communication (e.g. 127.0.0.1:9000, instead of /tmp/cherokee-php.socket) makes it much more robust. And before anyone says that using TCP/IP is slower, I don't think so, couldn't find any difference in speed, although I didn't measure it extensively. It seems that localhost TCP/IP transport on Linux is heavily optimized. But, my primary concern at this time is robustness. Anybody having gateway problems, try switching to TCP/IP communication, you might be pleasantly surprised. -- http://www.linuxinsight.com/ _______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
