[not solved] Failed to obtain or reinitialize VMemBuf

mistwang

LiteSpeed Staff
#21
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
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.
 

DoM

Well-Known Member
#23
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
 

mistwang

LiteSpeed Staff
#24
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.
 

anything

Well-Known Member
#29
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.
 

mistwang

LiteSpeed Staff
#31
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.
Will a restart fix it?
Please send us the section of error log starting to show this issue to bug@litespeed...
 
#32
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.
 

anything

Well-Known Member
#33
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.
 
#34
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)
 
#35
i moved the litespeed temp&swap directory to somewhere outside of /tmp and the problem has gone away.
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.
 
#36
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.
 
#38
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
 
#39
>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.

Also Can I change the swap directory to /home/lshttpd/swap folder and what about the security side of setting like this.
change /tmp/lshttps/swap to /home/lshttpd/swap, should not bring any security issue.

also If I change the /tmp to /home/lshttp/swap, is there any where else I need to make changes
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.

On another note, our old issue when running
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 tried the same and seems to be much better.

But the question is why the original script is having issue for this server only. We have more than 10 servers running on litespeed and none of those server is having such issues.
we have discussed the same issue before. the problem server now is the same one mentioned in your post 6 months ago ?
 
Top