sounds like its polling something, creating a race condition.

this is especially relevant on non-file filehandles (sockets, named pipes etc)

possibly the mysql connection? if it sends a request that takes a bit of time, and then polls for a response, this would slow the computer until the request is complete, also making the request take more time to complete. If the request finishes before the computer starts to 'race', there would be no apparent problem.

check the code - I've done this myself a few times and generally using select() with a timeout of about 0.1 seconds instead of hard-polling [while !$complete) { $complete = $db->requestComplete(); } sort of thing] fixes the problem.

this would be especially noticeable with multiple requests going, as all the perl instances would race all the query requests at once.

Another thing to check :

are you using ISAPI? or just starting a separate perl process for each file (going through perl.exe rather then perlis.dll)? starting processes is VERY expensive on windows systems, whereas ISAPI loads perl as a dll into the application space of the server removing 90% of the expense, due to a number of factors including that it doesn't need to re-load it for every request, and doesn't need to check dependencies and map memory etc each time.

by default, .pl files are run as a separate process, and .plx run through ISAPI.

the only problem with using ISAPI is that, since its a dll thats part of the server application, if perl crashes it takes the server with it, though generally IIS will set itself as an auto-reloading service so you'd get a max of 1 or 2 seconds downtime, with a useable message in the error log about it.


personally I use omnihttpd (www.omnicron.ca) for both my local and public servers and use perl for ISAPI exclusively and have never had this problem, even when moving my .plx files to clients' IIS servers.


On Wed, 7 Jan 2004 11:05:25 -0000, Haitham <[EMAIL PROTECTED]> wrote:

Dear friends

I have a website that uses Perl to generate pages from a database (mySQL). It is a 
news website.
The performance of the site is changing all the time without a reason. Sometimes it is 
normal. Others it is extremely slow. I check the task manager, and I can see few Perl 
jobs waiting for something to happen (no idea what). Each job is about 6M in size. 
Then suddenly, the server is finishing the jobs, and start send the text and pictures 
of the page.
It used to run smoothly, for a year. Then I needed to re-install Perl. Could it be the 
version (5.6)? I am running IIS 5.
I noticed that other webpages (not Perl-driven) are also slow. It looks like Perl is 
holding IIS. I usually check other things the server is doing at the same time and it 
doesn't look slow (such as the mail server).

Best regards
Haitham



_______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to