Under high load the Server serves this:
Software error: Can't call method "prepare" on an undefined value at /home/vroom/0.8mo +ds/Everything/NodeBase.pm line 1253. For help, please send mail to the webmaster (webmaster@willowisp.block +stackers.com), giving this error message and the time and date of the + error.
And I think it comes to me tanks to :fatalsToBrowser, therefore I think it doesn't show in the logs.

That leads to my question: Should you use ':fatalsToBrowser' in production code?

Replies are listed 'Best First'.
Re: Does Vroom know about this?
by chromatic (Archbishop) on Jun 27, 2001 at 22:24 UTC
    That happens in Everything when it can't get a database connection. As you say, that only happens under high loads, or when someone falls asleep on the database power switch. From that error message, I could probably find the particular modules vroom's modified to set up Perl Monks, but that depends on whether or not I have an account on willowisp or not. :)

    I don't use fatalsToBrowser in production code for precisely that reason. It's easy enough to add in paranoid error checking and give the user something sane while logging enough detail to make troubleshooting easier. But that's just the way Everything is configured straight out of the tarball.

Re: Does Vroom know about this?
by footpad (Abbot) on Jun 27, 2001 at 22:22 UTC

    I suspect so. There have been several incidents along these lines recently and *someone* has managed to resolve them fairly quickly (within minutes).

    Given the number of people that frequent the site regularly (and those ones that frequent is slightly less than constantly), it's likely that he's aware of the problem.

    And, no...fatalsToBrowser should not be in production code. At least, not in a perfect world.

    --f

Re: Does Vroom know about this?
by chipmunk (Parson) on Jun 28, 2001 at 02:15 UTC
    I think the real problem is that the code doesn't check that the database connection succeeded, which is why it ends up calling prepare on an undefined value. :)

    Remember, always check the return value of system calls!

Re: Does Vroom know about this?
by azatoth (Curate) on Jun 28, 2001 at 15:48 UTC
    I think instead of the error message in the browser, we should come up with someone fun like Nate's Word Generator on e2.

    I was over there the other day and the site went down, and when you connected to it you got the Word Gennie thing, which was pretty cool. Kept me amused for hours :P

    Perhaps, given the *huge* range of creative talent on this site, we should come up with a small comp for the Best DownTime Fun Thingie?

    Could be interesting...

    Azatoth a.k.a Captain Whiplash

    Make Your Die Messages Full of Wisdom!
    Get YOUR PerlMonks Stagename here!
    Want to speak like a Londoner?
Re: Does Vroom know about this?
by spudzeppelin (Pilgrim) on Jun 28, 2001 at 19:44 UTC

    I think the use of fatalsToBrowser depends on who the site's audience is. For this crowd, I think it's perfectly appropriate: we're not going to get turned off by a technical error message, and are more likely than not to forward all the details fatalsToBrowser (hey, it's better than the default 500 message in Apache) returns to someone in a position to deal with it.

    OTOH, I don't think it's appropriate for a site with a general, as opposed to technical, audience. In that case, you NEVER want to return a 500 of any kind. Instead, handle all your errors silently (ie. notify your tech people by email or pager or whatever) and return something innocuous to the browser, like:

    *COUGH!*

    Our webserver apparently has something stuck in its throat. Please try back in a few minutes.

    And your audience will thank you for being candid, yet not boring them with the gory details and instead presenting things in a manner more suited to them.

    Spud Zeppelin * spud@spudzeppelin.com