[not solved] Failed to obtain or reinitialize VMemBuf

anything

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

Failed to obtain or reinitialize VMemBuf. possibly running out of swap space.
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:

anything

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

NiteWave

Administrator
#5
just now I experienced same issue
2011-09-21 06:41:47.081 [ERROR] [x.x.x.x:4696-0#pkg] Failed to obtain or reinitialize VMemBuf. possibly running out of swap space.
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.
 

anything

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

anything

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

anything

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

anything

Well-Known Member
#11
I have similar experience on another website. if it happens again, please report it here to trace it.
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:

anything

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

NiteWave

Administrator
#15
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:

DoM

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

NiteWave

Administrator
#17
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.
 

DoM

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