Page 1 of 1
[SOLVED] - Memory size Exhausted
Posted: Wed May 20, 2020 4:43 pm
by mitrecyclers
Hi,
Today was getting Error 500 on server. In Server Error log found errors
Code: Select all
[Wed May 20 10:36:03.114185 2020] [lsapi:notice] [pid 3444018:tid 47787756623616] [client 82.14.31.251:52929] [host mitrecyclers.com] Backend log: PHP Warning: "continue 2" targeting switch is equivalent to "break 2". Did you mean to use "continue 3"? in /home/xxxx/public_html/vqmod/vqmod.php on line 684\n
[Wed May 20 10:35:20.389831 2020] [lsapi:error] [pid 3444018:tid 47787752421120] [client 46.229.168.135:3918] [host mitrecyclers.com] Backend fatal error: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /home/xxxx/public_html/vqmod/vqmod.php on line 168\n
Line 168
Line 684
I increased the memory size from php.ini to 256MB and it is okay now. But can anyone help. What caused it what it should be? Thanks.
Re: Memory size Exhausted
Posted: Wed May 20, 2020 4:54 pm
by sw!tch
VQMOD cache file to large maybe?
Re: Memory size Exhausted
Posted: Wed May 20, 2020 6:09 pm
by opencartmart
In the case of memory issues, this line number shows nothing. It can happen at any line. You should find the root cause. As the user mentioned, check the vqmod cache file size.
Re: Memory size Exhausted
Posted: Thu May 21, 2020 4:01 am
by Goran5103
Did you try to ask your hosting provider to enlarge your limits for testing purpose? They are usually willing to help
Re: Memory size Exhausted
Posted: Thu May 21, 2020 5:08 am
by OSWorX
mitrecyclers wrote: ↑Wed May 20, 2020 4:43 pm
What caused it what it should be?
Tipps here to increase memory, begging the provider and so on are nice - but useless!
Better to fix the bug!
Because the VQMod cachefile is getting bigger and bigger and bigger .. and so on ..
Therefore read this here:
https://github.com/vqmod/vqmod/pull/152 ... aa1bca60bf
That helps.
Beside this: "warnings" about continue and break are related to php version 7.4.x
While these are "only" warnings, you should fixt hese also.
Re: Memory size Exhausted
Posted: Thu May 21, 2020 5:10 am
by OSWorX
opencartmart wrote: ↑Wed May 20, 2020 6:09 pm
.. this line number shows nothing ..
If you would know the system better, you would also know where this line "sits".
Re: Memory size Exhausted
Posted: Thu May 21, 2020 3:43 pm
by opencartmart
OSWorX wrote: ↑Thu May 21, 2020 5:10 am
If you would know the system better, you would also know where this line "sits".
True, only if you know the system. Even you don't need a line number, only the file name is enough sometimes.
As OP shared line lumber with thinking that it could be the problem. My words were intended for that.
Re: Memory size Exhausted
Posted: Thu May 21, 2020 4:13 pm
by OSWorX
opencartmart wrote: ↑Thu May 21, 2020 3:43 pm
.. As OP shared line lumber with thinking that it could be the problem. ..
And that line (or code in) IS the problem.
Re: Memory size Exhausted
Posted: Thu May 21, 2020 4:18 pm
by opencartmart
OSWorX wrote: ↑Thu May 21, 2020 4:13 pm
And that line (or code in) IS the problem.
Which line you are referring to? I meant Line 168. I am not sure how could Line 168 be the problem.
Re: Memory size Exhausted
Posted: Thu May 21, 2020 5:44 pm
by paulfeakins
mitrecyclers wrote: ↑Wed May 20, 2020 4:43 pm
I increased the memory size from php.ini to 256MB and it is okay now.
Sounds like that was the problem and 256MB is a good value, so can we consider this solved?
Re: Memory size Exhausted
Posted: Thu May 21, 2020 6:30 pm
by letxobnav
sure but not because of the memory.
Re: Memory size Exhausted
Posted: Thu May 21, 2020 6:54 pm
by OSWorX
paulfeakins wrote: ↑Thu May 21, 2020 5:44 pm
mitrecyclers wrote: ↑Wed May 20, 2020 4:43 pm
I increased the memory size from php.ini to 256MB and it is okay now.
Sounds like that was the problem and 256MB is a good value, so can we consider this solved?
Unfortunately not.
Even when increasing the memory to x GB, the problem will arrise sooner than later ..
Because the problem is not the memory, it is VQMod (the line in it).
Re: Memory size Exhausted
Posted: Fri May 22, 2020 5:58 pm
by mitrecyclers
OSWorX wrote: ↑Thu May 21, 2020 5:08 am
mitrecyclers wrote: ↑Wed May 20, 2020 4:43 pm
What caused it what it should be?
Tipps here to increase memory, begging the provider and so on are nice - but useless!
Better to fix the bug!
Because the VQMod cachefile is getting bigger and bigger and bigger .. and so on ..
Therefore read this here:
https://github.com/vqmod/vqmod/pull/152 ... aa1bca60bf
That helps.
Beside this: "warnings" about continue and break are related to php version 7.4.x
While these are "only" warnings, you should fixt hese also.
Thanks. I modified VQMOD.php file and also deleted checked.cache file (30 MB). I hope it will resolve the issue.