Is the logging system thread-safe? I have a process that takes about 5 hours, and twice, it has stopped, giving me no errors at all... but the process hasnt been finished... The second time, I loaded the status page, and it gave me a 500 error, at the same time the process stopped. I have a sneaking suspicion that the cause is two processes trying to write to the log-file at the same time... I know the logging system keeps the log file open... any pointers or suggestions? help! :) Thanks, bodhi ===================================================Bodhi Philpot Programmer GPlusMedia Co., Ltd. ACCJ Ecentral TEL 03-5475-7773 FAX 03-5475-7774 GPlusMedia Websites: http://www.gaijinpot.com/ Japan''s No.1 Jobsite for Foreigners http://www.ecentral.jp/ Japan''s Jobsite for Bilinguals http://www.openspace.jp/ Tokyo''s bilingual Real Estate Portal http://www.globalhealth.jp/ Health Insurance for Foreigners in Japan ====================================================
Logging is thread safe because writing into files is an atomic operation on every operating system worth a damn as far as i know. On Mon, 7 Mar 2005 20:35:12 +0900, Bodhi Philpot <bodhi-DrnEsRrc7Su2oZ/6fjIToQ@public.gmane.org> wrote:> Is the logging system thread-safe? I have a process that takes about 5 > hours, and twice, it has stopped, giving me no errors at all... but the > process hasnt been finished... The second time, I loaded the status > page, and it gave me a 500 error, at the same time the process stopped. > I have a sneaking suspicion that the cause is two processes trying to > write to the log-file at the same time... I know the logging system > keeps the log file open... any pointers or suggestions? help! :) > > Thanks, > bodhi-- Tobi http://www.snowdevil.ca - Snowboards that don''t suck http://www.hieraki.org - Open source book authoring http://blog.leetsoft.com - Technical weblog
Ah, too true, didnt think of that... some other arcane bug then it seems... but thanks for putting me back on the right track! On 08/03/2005, at 1:49 AM, Tobias Luetke wrote:> Logging is thread safe because writing into files is an atomic > operation on every operating system worth a damn as far as i know. > > On Mon, 7 Mar 2005 20:35:12 +0900, Bodhi Philpot > <bodhi-DrnEsRrc7Su2oZ/6fjIToQ@public.gmane.org> wrote: >> Is the logging system thread-safe? I have a process that takes about 5 >> hours, and twice, it has stopped, giving me no errors at all... but >> the >> process hasnt been finished... The second time, I loaded the status >> page, and it gave me a 500 error, at the same time the process >> stopped. >> I have a sneaking suspicion that the cause is two processes trying >> to >> write to the log-file at the same time... I know the logging system >> keeps the log file open... any pointers or suggestions? help! :) >> >> Thanks, >> bodhi