Page 1 of 2

mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Sat Jan 26, 2019 6:15 am
by mRC
Hi all
I hope you can help, I have started getting the following error, OC 3.0.2.0 & Journal 2.16.8 & vqmod-2.6.3, PHP 7.0.31.

I only get this on going to add to cart

mod_fcgid: stderr: PHP Fatal error: Out of memory (allocated 155566080) (tried to allocate 33554440 bytes) in /var/www/xxxxxx/xxxxxxxxxxx/httpdocs/vqmod/vqmod.php on line 336

mod_fcgid: stderr: PHP Fatal error: Out of memory (allocated 293609472) (tried to allocate 4096 bytes) in /var/www/xxxxx/xxxxxxxxxx/httpdocs/vqmod/vqmod.php on line 168, referer: https://www.xxxxxxxxxx/checkout

mod_fcgid: stderr: PHP Fatal error: Out of memory (allocated 249569280) (tried to allocate 33554440 bytes) in /var/www/xxxxx/xxxxxx/httpdocs/vqmod/vqmod.php on line 341

I have 1024M set on server and in the php.ini file, I have gone from 256M to 512M then to 1024M and still getting the error.

thanks

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Sat Jan 26, 2019 6:36 am
by straightlight
Clear your VQMod cache from your VQMod root folder. This should resolved the issue.

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Tue Jan 29, 2019 10:35 am
by GL@collectiveus.com
I had the exact same issue when setting up a new store for a client, with OC 3.0.2.0, as straightlight said solved by clearing the cache, more specifically the file "/vqmod/checked.cache". The problem however will come back once the file again reaches the maximum memory as this file just continues to grow, so we set up a cronjob on our Apache server to delete this file every 5 minutes.

fairly easy to set up, just need to ssh into your server from terminal or command prompt(I think on windows).

once you are logged in, type "crontab -e"
add the following at the bottom of the page " */5 * * * * rm /full/path/to/vqmod/checked.cache"
(not including parenthesis)
then hit "ctrl - x" to exit and press "y" to save.

This solves the problem permanently and allows you to lower you memory limit if necessary.


Hope this helps someone :)

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Tue Jan 29, 2019 6:20 pm
by JNeuhoff
If this is caused by 'vqmod/checked.cache' then you may want to replace your VQmod with the Integrated VQmod because the latter only uses the OCmod cache at DIR_MODIFICATION. You can keep your 'vqmod/xml' folder.

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Sat Feb 09, 2019 8:28 pm
by mRC
thanks very much I will have a look at this

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Sat Feb 09, 2019 10:25 pm
by tingwing
the soulution is : open the files php.ini in your site root directory and in your admin directory,and edit memory_limit = 64M to memory_limit = 128M (or bigger)

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Sun Feb 10, 2019 5:11 pm
by mRC
Hi

thanks for the reply, we are @ 1024M but this is not the issue.

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Sun Feb 10, 2019 8:35 pm
by OSWorX
tingwing wrote:
Sat Feb 09, 2019 10:25 pm
the soulution is : open the files php.ini in your site root directory and in your admin directory,and edit memory_limit = 64M to memory_limit = 128M (or bigger)
Sorry, but giving only such stupid advices when there is a 'layout' bug, seems to be useless.
And (second), not everyone is allowed to increase php-values this way.

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Mon Feb 11, 2019 6:48 am
by IP_CAM
OSWorX wrote:
Sun Feb 10, 2019 8:35 pm
Sorry, but giving only such stupid advices when there is a 'layout' bug, seems to be useless.
Well, for those, who don't care about Errors + Warnings, as long as the Logs don't
eat up all available Server- Space + Memory, a Mod like the one linked could be a valid
Solution, to avoid, getting the place fixed. But it's sure no Solution, but only an easier
way, to not be confronted with, for a majority of Users, mostly unsolvable matters.

But it's similar to getting drunk, to 'blind out' problems, they won't go away, because
of such. Still, even for such, an OC-Mod exists! It only would need to be reworked, to
match, what obviously needs it most, to keep this place from beeing crowded ... :-)
https://www.opencart.com/index.php?rout ... n_id=25968

Just joking !!
Ernie
Image

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Mon Feb 11, 2019 11:18 am
by tingwing
it seems this problem is caused by vqmod-2.6.3.if you are using opencart3.0.2,I feel you donot need to install vqmod-2.6.3,I would suggest to select ocmod extension instead

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Mon Feb 11, 2019 11:20 am
by tingwing
secondly ,please try to go to backend-system-maintaince clear all those useless logs

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Mon Feb 11, 2019 11:44 am
by IP_CAM
tingwing wrote:
Mon Feb 11, 2019 11:18 am
it seems this problem is caused by vqmod-2.6.3.if you are using opencart v.3.0.2,I feel you do not need to install vqmod-2.6.3
Well, Qphoria, the Developer of VqMod, already warned, not to use VqMod
for later Oc Versions, obviously due to an unsolved yet memory-related problem.
But it does not keep the Folks from doing it anyway, instead of using JNeuhoff's
Integrated VqMod Version.

This Version does not use it's own VqCache/ .... File Directory, to store Files, until
the Site breaks down (as it looks), but add's it's Modifications directly to the default
OcModded Cache File(s) in charge. And if one ever clears the OcMod Cache, it's all gone,
and all OcModded Cache Files will be rebuilt, first by OcMod, and then 'completed'
by VqMod, if required. It's as easy as that.

I just wonder, how long it will take, until the last OC Newbie starts to read first
some related Forum Topics, before starting to play around with unknown Stuff.
Ernie
---
Integrated VQmod for OpenCart
https://www.opencart.com/index.php?rout ... n_id=19501
---

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Thu Feb 21, 2019 4:41 am
by mRC
JNeuhoff wrote:
Tue Jan 29, 2019 6:20 pm
If this is caused by 'vqmod/checked.cache' then you may want to replace your VQmod with the Integrated VQmod because the latter only uses the OCmod cache at DIR_MODIFICATION. You can keep your 'vqmod/xml' folder.
I have installed the integrated VQmod and kept the xml folder and all seems to be working and its seems quicker too. so see how it goes with this now and thanks for the help!!!!!

One thing I did notice that one vqmod isn't working, its the only one I have that uses twig (order_invoice.twig)

VQmod - Processing 'Sales Invoice Admin Mod'
VQmod - UNABLE TO FIND FILE(S), IGNORED:
file = ''
VQmod - Done 'Sales Invoice Admin Mod'

Code: Select all

<modification>
	<id>Sales Invoice Admin Mod</id>
	<version>3.0</version>
	<vqmver>3.0</vqmver>
	<author>xxxxx</author>
	<file name="admin/view/template/sale/order_invoice.twig">
		<operation>
			<search position="replace"><![CDATA[<h1>{{ text_invoice }} #{{ order.order_id }}</h1>]]></search>
			<add><![CDATA[<br />
			<img src="http://www.xxxxxx/image/catalog/Mainxxxx/xxxxxxx.png"><br /><br />]]></add>
       		</operation>
    	</file>
</modification>
Could someone shed a little light on this, it was working on the standard VQmod system

Thanks

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Thu Feb 21, 2019 6:52 am
by IP_CAM
in the file:
admin/view/template/sale/order_invoice.twig
it's looking for this Line (exactly written as shown)

Code: Select all

<h1>{{ text_invoice }} #{{ order.order_id }}</h1>
to replace that default Line with the VqMod Content below:

Code: Select all

<br />
	<img src="http://www.xxxxxx/image/catalog/Mainxxxx/xxxxxxx.png"><br /><br />
whereby this Line:

Code: Select all

<h1>{{ text_invoice }} #{{ order.order_id }}</h1>
probably looks a little different in your OC File. So check, and
replace/insert the EXACT OC Source Line Content into the VqMod,
to make it work, after you cleared out the OcMod Cache first.
Ernie
---
PS If the Line looks exactly the same, also check it's corresponding
..... /admin/view/template/sale/order_invoice.twig cached file
in the Extension / Modification Cache-Section, to find out, in another
Modification already changed that specific Line to something else ...

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Thu Feb 21, 2019 3:21 pm
by mRC
Thanks for the reply,

I have checked the file location and also the code line but its still not finding it, (VQmod - UNABLE TO FIND FILE(S), IGNORED:)

I do have a few vqmods but all the others work fine its just this one on the .twig file.

I cant seem to find the (Extension / Modification Cache-Section) where is this located, is it in the storage folder (outside of the httpdocs folder.

Thanks very much

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Thu Feb 21, 2019 9:40 pm
by straightlight
where is this located, is it in the storage folder (outside of the httpdocs folder.
vqmod/xml folder.

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Fri Feb 22, 2019 3:08 am
by mRC
straightlight wrote:
Thu Feb 21, 2019 9:40 pm
where is this located, is it in the storage folder (outside of the httpdocs folder.
vqmod/xml folder.
Sorry but now I am confused, so your saying the Extension / Modification Cache is stored in the vqmod/xml folder ???

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Fri Feb 22, 2019 3:27 am
by mRC
I have found the folder now (/storage/modification) thanks very much

there is no order_invoice.twig file generated, I have checked the file location and the code and all seems good. and I have checked file permissions

Seems fine

so my question could there be an issue with integrated vqmod.

This vqmod is the only one using the admin folder and I have a customer admin folder name. could this be the problem

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Fri Feb 22, 2019 3:34 am
by straightlight
I was referring to your last post:
I have checked the file location and also the code line but its still not finding it, (VQmod - UNABLE TO FIND FILE(S), IGNORED:)
As for your system/storage folder, do you see other folders and files that were generated since you installed extensions on your store?

Re: mod_fcgid: stderr: PHP Fatal error: Out of memory

Posted: Fri Feb 22, 2019 3:44 am
by mRC
Hi
Yes all the files are being generated but I have just found the issue, its a very simple fix

changed to
<file name="admin/view/template/sale/order_invoice.twig">

I was using
<file name="myadminfoldername/view/template/sale/order_invoice.twig">

sorry but I didn't notice that the vqmod requires the stock folder names LOL, this explaines why all the other mods are working.

Just to say thank you to you all, great support O0