Re: Session table not updated: "Server went away"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?=

    Re: Session table not updated: "Server went away"

    Puzzled escribió:
    I'm running php4 and storing session data in a dedicated table.
    To cut down on twiddle time in a particular app, I'm trying to
    store a MB or so of r/o data in $_SESSION.
    >
    But when I get above a certain size while building the array, the
    data fails to store and the error log shows a false "server went
    away" complaint.
    >
    I'm guessing that I'm beating up some buffer somewhere, but I
    can't figure out which one. Does the problem sound familiar to
    anyone?
    You don't mention what your DBMS is so I'll assume you're using the only
    one that exists, MySQL. Check the max allowed packet size:



    In old versions it defaulted to very small values.


    --
    -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
    -- Mi sitio sobre programación web: http://bits.demogracia.com
    -- Mi web de humor al baño María: http://www.demogracia.com
    --
  • =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?=

    #2
    Re: Session table not updated: "Server went away"

    Puzzled escribió:
    Gracias, Álvaro - that was the problem (and I should have
    mentioned it was MySQL). The server's default "packet" size is
    unlisted in the ini and only 1M, but instead of giving a helpful
    error message it just shrugged and pretended it was on its öl
    break. :-)
    >
    I vaguely remembered reading about the problem some time ago, but
    couldn't recall enough of what I read to go find it again, so
    again: thanks!
    >
    >
    >
    >
    For anyone with the same problem: the solution is to edit your
    my.ini and put into the [mysqld] section the line
    >
    max-packet-size:32M
    >
    (or some other number larger than the unlisted 1M default)
    I'm glad it helped. Just a correction to my previous message: the server
    default is 1MB, period. It hasn't changed in recent versions as I claimed.


    --
    -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
    -- Mi sitio sobre programación web: http://bits.demogracia.com
    -- Mi web de humor al baño María: http://www.demogracia.com
    --

    Comment

    Working...