Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl
Protecting a mod perl 1.3 site from slow MySql processes
 

Index | Next | Previous | View Flat


April.Papajohn at mathworks

Dec 2, 2008, 10:56 AM


Views: 313
Permalink
Protecting a mod perl 1.3 site from slow MySql processes

Hello,

I am working on a site that has a modperl (mod_perl 1.3, perl 5.8.0, on linux)
handler doing some authentication work via DBD::MySql. It connects to
a MySQL server over the network.

Recently during some maintenance on the MySql server, the entire site
was hung up, because the MySQL server was up, but it wasn't
responding. It is important that the site continue to function, even
if MySql is down or slow.

I was able to reproduce something like what may have happened simply
by pausing the MySql thread in my test environment. If I do that, the
web page does just hang.

The perl module wasn't dying, so wrapping everything in eval{} won't
solve the problem.

I tried setting alarm() around the DBI lines, using the Sys::SigAction
module, in order to get the script to timeout if MySql isn't
responsive. This works great if I run it as a plain perl script. But
it seems that alarm() doesn't work when it runs as a perl module.

So now I'm stuck.

I'm just looking for suggestions for possible solutions. Any way that
I can safe guard the site against a misbehaving MySql server.

Thanks,
April

Subject User Time
Protecting a mod perl 1.3 site from slow MySql processes April.Papajohn at mathworks Dec 2, 2008, 10:56 AM
    Re: Protecting a mod perl 1.3 site from slow MySql processes perrin at elem Dec 2, 2008, 11:24 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.