[not solved] Failed to obtain or reinitialize VMemBuf

Discussion in 'Bug Reports' started by anything, Sep 20, 2011.

  1. anything

    anything Member

    titile: Failed to obtain or reinitialize VMemBuf. possibly running out of swap space.

    have been getting these errors on file uploads to litespeed webserver 4.1.4.

    its happened three times so far, several days between incidents. haven't been able to work out what causes it.
    once it starts happening it seems to happen to everyone if the upload is above a certain size (i haven't worked out what size exactly).

    restarting litespeed solves the problem.

    /tmp has plenty of space
    and /tmp/lshttpd's permissions appear to be fine
    Last edited by a moderator: Mar 15, 2012
  2. NiteWave

    NiteWave Administrator

  3. anything

    anything Member

    i found that last week when looking into the first occurrence but it didnt seem to help
    /tmp/lshttpd/swap's permissions are ok. owned by lsws, the same user as litespeed is running as.

    there are no other errors in any log files at the same time of each error.
    the upload is not even attempted by the browser, a connection reset error is seen in the browser instantly.

    as restarting lsws fixes the bug it also seems to suggest its not a file permission error.
  4. anything

    anything Member

    the problem has happened again.
    6 hours of errors over night preventing all file uploads to our sites.

    i've rolled back to 4.1.3
  5. NiteWave

    NiteWave Administrator

    just now I experienced same issue
    it's 4.0.20. lsphp 5.1.2 with Server API : LiteSpeed 4.10

    so it's not likely an issue between 4.1.3 and 4.1.4

    I did a change in php.ini:
    upload_tmp_dir = /tmp
    (it's not set before.) and restarted lsws.

    my test shows upload 1M file was ok, but failed for a 1.8M file.

    maybe restart lsws resolved the issue as you observed.
    just put more info here.
  6. anything

    anything Member

    upload_tmp_dir is not set in my php.ini either. sys_get_temp_dir() returns /tmp
    should i set it anyway?

    /tmp has 4.2gig free. according to graphs it got as low as 3.9gig yesterday.

    restarting lsws means that the problem goes away for some time. seems to come back on its own for no reason.

    for example, I just uploaded a 10mb file with no problem. while it was uploading I could see /tmp/phpnMUhZ6 getting filled.
  7. anything

    anything Member

    This problem has returned again today.
    Strange that only yesterday I upgraded to lsws 4.1.10.

    any suggestion as to what might be the cause?
  8. NiteWave

    NiteWave Administrator

    does it happen once just after upgrade, or does it happen times(can check the error log) after upgrade ?
  9. anything

    anything Member

    I don't know what triggered it last time (perhaps an upgrade that I had forgotten), but this time it seems it probably was the upgrade that caused it.
    It happened on every website accepting file uploads until i ran "lswsctrl restart".
    so far for the last 2 days no error has been reported.
  10. NiteWave

    NiteWave Administrator

    I have similar experience on another website. if it happens again, please report it here to trace it.
  11. anything

    anything Member

    Hi NiteWave, it has happened again.

    Discovered by users attempting to upload 7mb video files.
    Smaller file uploads worked, but larger ones didn't (I didnt troubleshoot far enough to find the largest size possible)

    logs report lsws was restarted automatically at 5am, only 9 hours before the first errors were reported.

    restarting lsws seemed to be the only solution again.

    i checked lsws's log file for any other errors however there are no other error level reports before it (just a bunch of php errors or 404s)
    Last edited: Feb 22, 2012
  12. mistwang

    mistwang LiteSpeed Staff

  13. anything

    anything Member

    today the /tmp dir has 6.1gig free.
    Last edited: Feb 23, 2012
  14. anything

    anything Member

    after the last problem i stopped lsws completely, made sure no processes were running, and started it fresh.
    no problem yet (its been over a week)

    could it be that the graceful restart after an upgrade isnt doing things properly.
  15. NiteWave

    NiteWave Administrator

    it's kind of hard-tracing issues ... it may due to other bug fixes in 4.1.11(e.g. memory-leak etc) which fix the issue as well. let's assume 4.1.11 has no such issue any more -- if still happen, please re-open this thread.
    Last edited: Mar 2, 2012
  16. DoM

    DoM New Member

    same issue

    Hello,
    same issue here:

    Failed to obtain or reinitialize VMemBuf. possibly running out of swap space.
    and
    Failed to create temp file with mkstemp(): No such file or directory

    disk of course has giga and giga of space.


    LSWS 4.1.11

    Waiting for your reply

    Regards
  17. NiteWave

    NiteWave Administrator

    can you do what suggested in previous post:

    1.force-reinstall 4.1.11 to latest version

    2.stop lsws completely, then start it, not restart gracefully
    use
    #/usr/local/lsws/bin/lswsctrl stop
    and / or
    #killall litespeed
    to stop it completely. and use
    #pstree -p | grep litespeed
    to check if no litespeed process is running

    this will only cause down time within 1 minute.
    then start litespeed.

    if still happen, please continue reporting here.
  18. DoM

    DoM New Member

    It's not fixed.

    Many customers complain on this new version about:

    1) upload that can reach maximum 1mbit,
    2) all wordpress permalink do not work anymore
    3) this error


    I think that 's ALL related to same issue.


    Waiting for your reply

    Regards
  19. webizen

    webizen New Member

    you mean upload speed at 1Mbps max or upload filesize limit 1MB?
  20. DoM

    DoM New Member

    Upload size.

Share This Page