[not solved] Failed to obtain or reinitialize VMemBuf

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

  1. mistwang

    mistwang LiteSpeed Staff

    It is likely that the process' virtual memory has been exhausted
    Please check output of

    ulimit -v

    set it to unlimited in /etc/security/limits.conf, then restart LSWS. Also check the number of available inode for the /tmp partition.
  2. mistwang

    mistwang LiteSpeed Staff

  3. DoM

    DoM New Member

    Did it. it's already like this.

    New dir is /var/lshttpd/swap with 777 permissions and it worked until version 4.1.10


    Waiting for your reply

    Regards
  4. mistwang

    mistwang LiteSpeed Staff

    you need to verify parent directory permission with

    sudo -u nobody touch /var/lshttpd/swap/tempfile

    download the latest 4.1.12 build see if it work properly or not. It should help with the CPU usage issue with your server.
  5. DoM

    DoM New Member

    Everything works with permissions.

    THere is a fix in 4.1.12 ?


    Waiting for your reply

    Regards
  6. mistwang

    mistwang LiteSpeed Staff

    Please check the ticket reply about 4.1.12.
  7. DoM

    DoM New Member

  8. mistwang

    mistwang LiteSpeed Staff

    sorry, I probably mistake you with another client. I will PM you the link.
    Last edited: Mar 10, 2012
  9. anything

    anything Member

    why is this thread marked as solved?
    what is the solution?

    it has happened again to me today, started happening 8 hours ago. Any file uploads above 1MB or so would fail with Error 500.
    Failed to obtain or reinitialize VMemBuf. possibly running out of swap space.
  10. NiteWave

    NiteWave Administrator

    ok. marked as [not solved]
  11. mistwang

    mistwang LiteSpeed Staff

    Will a restart fix it?
    Please send us the section of error log starting to show this issue to bug@litespeed...
  12. gnu.smtp

    gnu.smtp New Member

    Is this error fixed now

    I am also facing this issue now.

    /dev/sda7 2.0G 437M 1.5G 24% /tmp

    free -m
    total used free shared buffers cached
    Mem: 8104 7613 491 0 228 6268
    -/+ buffers/cache: 1116 6988
    Swap: 4094 1 4093


    Error getting is upload files shows Crunching and Litespeed error shows "Failed to obtain or reinitialize VMemBuf. possibly running out of swap space"

    If we restart the litepseed it gets fixed for a short while but reappears the same issue.

    Is there any permanent fix for this.

    Please consider this as a serious issue as we cannot keep restarting the lsws for each upload.
  13. anything

    anything Member

    could be marked as possibly-solved.

    i moved the litespeed temp&swap directory to somewhere outside of /tmp and the problem has gone away.

    i believed our crons watching /tmp to remove old untouched files (also aka tmpwatch) were inadvertently removing old litespeed temp files that it hadn't touched in several days. then suddenly litespeed expects the file to be there and it isnt. this also might explain why i was only seeing the error every 2-3 days.
  14. gnu.smtp

    gnu.smtp New Member

    Litespeed Guys,

    Is there any other fixes ? I have also seen issues like litespeed stops responding while runinng the cleancache script (eventhough we have not enabled cache)
  15. NiteWave

    NiteWave Administrator

    thanks.

    gnu.smtp,

    can you follow above clue and see if the issue gone since then ?

    if it's confirmed, it'll help us much to identify the issue then can work out a correct fix.

    the difficulty of this issue is, it's not easily to reproduce.
  16. gnu.smtp

    gnu.smtp New Member

    Hello,

    Can you guide me how to make such a change ? Do we need to add cron for removing that also ?

    Please let me know the exact steps as I do not want to cause any downtime in our shared server.
  17. mistwang

    mistwang LiteSpeed Staff

  18. gnu.smtp

    gnu.smtp New Member

    Hello,

    Can you let me know the optimum value of Max I/oBuffer ?

    Also Can I change the swap directory to /home/lshttpd/swap folder and what about the security side of setting like this.

    On another note, our old issue when running

    nobody 623 0.0 0.0 4636 1180 ? SN 07:54 0:00 /bin/sh /usr/local/lsws/admin/misc/cleancache.sh /tmp/lshttpd/swap
    nobody 2694 0.0 0.0 4636 1180 ? SN 07:55 0:00 /bin/sh /usr/local/lsws/admin/misc/cleancache.sh /tmp/lshttpd/swap
    root 4432 0.0 0.0 4032 724 pts/7 S+ 08:13 0:00 grep http
    stackabl 4622 0.0 0.2 30404 18516 ? SN 08:03 0:00 cpanellogd - http logs for stackabl
    nobody 6300 0.0 0.0 4636 1180 ? SN 08:03 0:00 /bin/sh /usr/local/lsws/admin/misc/cleancache.sh /tmp/lshttpd/swap
    nobody 17075 0.0 0.0 4332 788 ? DN 08:10 0:00 find /tmp/lshttpd/swap/4 -type f -mtime +1 -delete
    nobody 17110 0.0 0.0 4332 788 ? DN 08:10 0:00 find /tmp/lshttpd/swap/4 -type f -mtime +1 -delete
    nobody 17122 0.0 0.0 4332 792 ? DN 08:10 0:00 find /tmp/lshttpd/swap/4 -type f -mtime +1 -delete
    nobody 17127 0.0 0.0 4332 788 ? DN 08:10 0:00 find /tmp/lshttpd/swap/5 -type f -mtime +1 -delete
    nobody 17153 0.0 0.0 4332 744 ? DN 08:10 0:00 find /tmp/lshttpd/swap/5 -type f -mtime +1 -delete
    nobody 17159 0.0 0.0 4332 780 ? DN 08:10 0:00 find /tmp/lshttpd/swap/9 -type f -mtime +1 -delete
    nobody 17210 0.0 0.0 4332 744 ? DN 08:10 0:00 find /tmp/lshttpd/swap/a -type f -mtime +1 -delete
    nobody 19261 0.0 0.0 4636 1180 ? SN 07:59 0:00 /bin/sh /usr/local/lsws/admin/misc/cleancache.sh /tmp/lshttpd/swap
    nobody 23399 0.0 0.0 4636 1184 ? SN 07:42 0:00 /bin/sh /usr/local/lsws/admin/misc/cleancache.sh /tmp/lshttpd/swap
    nobody 31203 0.0 0.0 4636 1180 ? SN 07:54 0:00 /bin/sh /usr/local/lsws/admin/misc/cleancache.sh /tmp/lshttpd/swap
    nobody 31250 0.0 0.0 4636 1176 ? SN 07:45 0:00 /bin/sh /usr/local/lsws/admin/misc/cleancache.sh /tmp/lshttpd/swap


    when this runs sites gets hung and restart of litespeed do not have any effect.

    Any possible solutions ? also If I change the /tmp to /home/lshttp/swap, is there any where else I need to make change s
  19. NiteWave

    NiteWave Administrator

    >Can you let me know the optimum value of Max I/oBuffer ?
    usually default value is fine, no need change except you have explicit reason.

    change /tmp/lshttps/swap to /home/lshttpd/swap, should not bring any security issue.

    correction: it's not change /tmp to /home/lshttp/swap, but change /tmp/lshttps/swap to /home/lshttp/swap. only change this setting is ok.

    thanks for the report. looks the script need improvement to prevent multiple
    "find /tmp/lshttpd/swap/4 -type f -mtime +1 -delete" processes running at the same time.

    just search our forum:
    http://www.litespeedtech.com/support/forum/showthread.php?p=34155
    we have discussed the same issue before. the problem server now is the same one mentioned in your post 6 months ago ?

Share This Page