Dear Tutors,

I have a multithread python service on a windows server,
that brekas down sometimes.
It is a service, that runs on a server and listen on the 9100
tcp port on three IP addresses, just as three jetdirect devices.
It listens as a virtual printer, captures the content of the 
print jobs and makes local backups from them. It also creates
a bat file, that can be used to copy the captured files to the
real printers via nc.




I feel that the problem is somewhere on the write_files process.
The tree threads feeds the queues paralelly, and the manger.write_files()
is responsible to pick the first ones and write them into local files.
I have no got any idea, how may I controll to pick up them only once.
I am affraid that, this function is called more times from different 
threads
in the same time, and it could stop that thread.


I have tried to place a try except into the threads itself, but 
it made it absolutly unstable. 
It was funny as it worked absolutly well in service debug mode
and stoped allways started in service mode, anyway.


I am also interested about that,
where should I place the try except blocks in the thread.



Yours sincerely,
______________________________
Janos Juhasz

Attachment: VirtualPrinterService.py
Description: Binary data

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to