Hello. My apologies for not providing a patch for this and deadlock issue. (i think it can be solved using memory based posix semaphore placed in shared mem. FreeBSD supports posix sem since 7.2) If i manage my time (maybe this summer) ill do my best to help improve uwsgi as i think it is cool project. (besides i am a primary a pythonist.)
I just investigated on problem that was bothering me from time to time: how to property measure time. Here is a good link explaning a problem and giving solution http://blog.habets.pp.se/2010/09/gettimeofday-should-never-be-used-to-measure-time I think uwsgi should use CLOCK_MONOTONIC (better CLOCK_MONOTONIC_RAW on linux) and clock_gettime. Yes it is a rare problem but just a few month ago i found that our productions servers wasnt running ntp and there was 1-5 min deviation in server time. So i said to admins and it was a bit scary to look how admin synced time in production. I did not checked but i think if i skew system clock backward 10 sec with harakiri set to 10 that will kill all active workers. (in set_harakiri : uwsgi.workers[uwsgi.mywid].harakiri = time(NULL) + sec;) Best regards. -- -------------------------------------------- Турнаев Евгений Викторович +7 906 875 09 43 -------------------------------------------- _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
