Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I recently installed Apache and mod_perl 1.99 on a re-deployed W2K server and ported our search code. Everything looked great. Performance is excellent when it's working. DB connections are down, so persistence seems to work. My problem is that the server goes comatose and my error logs fill up with the same error message over and over....

Mon Mar 15 16:08:45 2004 warn (OS 121)The semaphore timeout period has expired. : winnt_accept: Asynchronous AcceptEx failed.
Mon Mar 15 16:08:45 2004 warn (OS 64)The specified network name is no longer available. : winnt_accept: Asynchronous AcceptEx failed.
Mon Mar 15 16:08:45 2004 warn (OS 64)The specified network name is no longer available. : winnt_accept: Asynchronous AcceptEx failed.
Mon Mar 15 16:08:45 2004 warn (OS 64)The specified network name is no longer available. : winnt_accept: Asynchronous AcceptEx failed.
Mon Mar 15 16:08:45 2004 warn (OS 64)The specified network name is no longer available. : winnt_accept: Asynchronous AcceptEx failed.
Mon Mar 15 16:08:45 2004 warn (OS 64)The specified network name is no longer available. : winnt_accept: Asynchronous AcceptEx failed.
Mon Mar 15 16:08:54 2004 warn (OS 64)The specified network name is no longer available. : winnt_accept: Asynchronous AcceptEx failed.
Mon Mar 15 16:08:54 2004 warn (OS 64)The specified network name is no longer available. : winnt_accept: Asynchronous AcceptEx failed.

Unfortunately, this didn't show up until we went live and put a load on the machine. Now, serving 400,000-500,000 scripts a day produces error files that are 200-500KB. Today was even worse, 2.5MB of errors. Rebooting sometimes helps for a while, but still, the server definately dies for anywhere from a few seconds to a few minutes.

So, I have two questios:

1) Has anyone gotten around the problems with mod_perl in Windows? If so, how?

2) I installed a trial version of PerlEx today which appears to work perfectly with my modified mod_perl scripts by only adding the PerlEx::DBI call. Is PerlEx ready for prime time or will have different problems with it?

Thanks, Rod

  • Comment on Is mod_perl for Windoze not ready for prime time?

Replies are listed 'Best First'.
Re: Is mod_perl for Windoze not ready for prime time?
by stvn (Monsignor) on Mar 17, 2004 at 01:22 UTC
    Rod,

    mod_perl 1.99 is still under development, and is not really recommended for production use. But Apache 1.36/mod_perl 1.0 on Windows is essentially a single-threaded, single-process application and while somewhat more stable, is not really recommended for production use either.

    Personally I have used both the Apache 1.36/mod_perl 1.0/Win2K and Apache 2.0/mod_perl 1.99/Win2K in production, but on a pretty low traffic a site (nowhere near the hits you are getting). I was pretty much forced into it by our client, our app usually runs on Linux or BSD but they wanted Windows, and in the end, the client is always right :-P. Personally I would not recommend it at all, and have promised to fight tooth and nail the next time a client requests we deploy on Windows.

    I would recommend moving to some form of UNIX instead of Win2K, you will likely see even better performance than you are seeing now. Although, this is just my opinion and experience, others may have had different results, so take what i say with a grain of salt.

    -stvn
      Thanks, at least my suspicions are confirmed. Now, I've got to move to apps back off to other servers which are over loaded so I can start over on this server. The problem is that I only know enough about UNIX to be dangerous. I know performance will be better, but given the learning curve, which flavor of UNIX and mod_perl would you choose for a dual P3, 1.2Mhz machine with 4GB of memory and RAID? Thanks, Rod
        For a webserver facing the internet I'd use Debian (stable) or FreeBSD, however be aware that you're in for a lot of reading.

        Makeshifts last the longest.

        Just for a bit of advocacy, I found debian really, really easy to install and configure. You can do a "Base install", it asks maybe a dozen questions total, most of which seemed fairly obvious to me (configure keybord, add accounts, configure network, etc) and then you have a nice clean base system with basically nothing running. Nothing running = no security holes.

        After that, assuming you have the network setup, a simple apt-get install apache-perl and bam, you've got apache 1.3x and mod_perl 1.x set up properly. =]. Obviously you still have to configure the various bits, but I found it simple and easy at least.
        Rod,

        I know performance will be better, but given the learning curve, which flavor of UNIX and mod_perl would you choose for a dual P3, 1.2Mhz machine with 4GB of memory and RAID?
        To be honest, we usually are deploying on managed servers, so I can't really say. For our inhouse dev and staging servers we usually use RedHat, but being that I only write the code (and configure Apache/mod_perl) my knowledge of the details of Linux/UNIX and hardware is limited. There are alot of good suggestions here already, but I would take that question over to a more Linux/UNIX/BSD oriented board and see what they say there too.

        -stvn
Re: Is mod_perl for Windoze not ready for prime time?
by PodMaster (Abbot) on Mar 17, 2004 at 01:13 UTC
      I've googled, I've post bug reports. In fact a lot of folks have posted bugs reports. It's the lastest greatest. I even compiled with a later version of perl. However, I agree. It's Apache, but you can't separate the two.
        It's Apache, but you can't separate the two.
        Why not? All the bug reports I saw made no mention whatsoever of mod_perl so the problem is an Apache problem, not related at all to mod_perl (meaning seek help from the Apache folks, not perl folks).

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.