Post by RideTheWave » Tue Jun 12, 2018 12:32 pm

Today I suddenly got the error message:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 68 bytes) in /home/myservername/public_html/vqmod/vqmod.php on line 168
This message is appearing in both the front end and the backend. After about a year of using OpenCart, this is the first time an error caused the site to completely go down. What fixed the issue was deleting vqmod/checked.cache and vqmod/mods.cache. I don't want to have to keep doing this whenever the site goes down. Is there a way to fix this so it doesn't happen again? Perhaps a setting in the php.ini file? These are the settings in my current php.ini file:

Code: Select all

magic_quotes_gpc = Off;
register_globals = Off;
default_charset	= UTF-8;
memory_limit = 256M;
max_execution_time = 36000;
upload_max_filesize = 8M;
safe_mode = Off;
mysql.connect_timeout = 20;
session.auto_start = Off;
session.use_only_cookies = On;
session.use_cookies = On;
session.use_trans_sid = Off;
session.cookie_httponly = On;
session.gc_maxlifetime = 3600;
allow_url_fopen = on;
;display_errors = 1;
;error_reporting = E_ALL;
max_input_vars = 2500;
Can anyone recommend anything to prevent this from happening again? Either in the php.ini file or anywhere else? I'm using OpenCart 2.3.0.2. Any suggestion would be greatly appreciated.

New member

Posts

Joined
Fri May 19, 2017 8:29 am

Post by synapseindia » Tue Jun 12, 2018 4:38 pm

Hi

Try to increase below fields in php.ini file .

Code: Select all

memory_limit = 256M;
max_execution_time = 36000;
upload_max_filesize = 8M;
Thanks

User avatar
Active Member

Posts

Joined
Thu Apr 05, 2018 2:27 pm

Post by RideTheWave » Tue Jun 12, 2018 5:36 pm

Ok, I'll try doing that. I wouldn't want to put values that are too high though. Do you have a recommended number that I should put for each?

New member

Posts

Joined
Fri May 19, 2017 8:29 am

Post by thekrotek » Tue Jun 12, 2018 5:58 pm

memory_limit = 512M;
upload_max_filesize = 128M;

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Active Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by synapseindia » Tue Jun 12, 2018 6:04 pm

Code: Select all

memory_limit = 512M; 
upload_max_filesize = 32M;
Above values is fine.

User avatar
Active Member

Posts

Joined
Thu Apr 05, 2018 2:27 pm

Post by RideTheWave » Tue Jun 12, 2018 6:46 pm

Ok, I made the changes. Should I still keep my eye out on for the size of the vqmod/checked.cache and vqmod/mods.cache files in case they get too large? Do those files just keep getting larger and larger? Or is there is a limit on how large they get?

New member

Posts

Joined
Fri May 19, 2017 8:29 am

Post by synapseindia » Tue Jun 12, 2018 9:10 pm

It is cache files. You can set the cron on server to delete these cache files every month or 15 days. VQMod will regenerate those files automatically.

User avatar
Active Member

Posts

Joined
Thu Apr 05, 2018 2:27 pm

Post by straightlight » Tue Jun 12, 2018 10:11 pm


The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by RideTheWave » Thu Jun 14, 2018 2:09 pm

So is it normal for the vqmod/checked.cache and vqmod/mods.cache files to keep getting larger and larger as time passes? Are we SUPPOSED to be deleting those files regularly? I don't mind doing it, I'm just wondering if this is normal or if there is something wrong in my setup.

If these files are supposed to get larger and larger as time passes, then does it matter what you put as the memory limit in the php.ini file? Sooner or later wouldn't that memory limit get exceeded when these files get larger and larger?

New member

Posts

Joined
Fri May 19, 2017 8:29 am

Post by synapseindia » Thu Jun 14, 2018 5:28 pm

Those file didn't take much memory so i am wondering why your store taking this memory . It is just cache files for the modification which you are using for vqmod xml changes. There might be any extension which is creating problem . You need to cleanup your store files to find out the reason. It would be great if you can check by disable/enable extension one by one and check cache file size .

User avatar
Active Member

Posts

Joined
Thu Apr 05, 2018 2:27 pm

Post by IP_CAM » Fri Jun 15, 2018 1:35 am

Well, all this has nothing to do with VqMod, that's for sure. :crazy: But no-one yet
told you, that your php.ini Memory Setting Value always depends on
the AMOUNT of Memory, you're allowed to use, and if you use a cheap Hoster,
this Value might be limited to less than i.E. 128 Megabytes.
In more professional Hostings, it can be set in the Server Admin PHP Section,
as shown on the image below.
And I then find a user.ini file in my Site Root, looking like this:

Code: Select all

[PHP]
memory_limit = 640M
Just to have it mentioned ... ;)
Ernie
---
Image

Attachments

set_php_server_memory_limit.jpg

set_php_server_memory_limit.jpg (88.19 KiB) Viewed 1089 times


For Sale: Top URL's, including OpenCart V-Pro installed, like seen here:
http://www.bigmax.ch - http://www.ipcam.li - http://www.opencart.li
For Information + URL's offered, please contact me at: jti@jacob.ch
I am NOT available for Custom Support in existing OC Installations!
My Github Repositories: https://github.com/IP-CAM
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by RideTheWave » Fri Jun 15, 2018 9:14 am

Thanks for all your replies. I think I may have solved the problem and it appears to have been both a memory issue as well as a vqmod issue. When I looked at the checked.cache file, it was creating a duplicate line upon every page load. That duplicate line was:

Code: Select all

/home/mysite/vendor/autoload.php
So after a year, this file just got larger and larger because of that one line that kept being duplicated. Eventually the file got too large, exceeding the memory limit and giving the fatal memory size error.

This is discussed in more detail here: https://github.com/vqmod/vqmod/issues/94 and they recommend a few fixes. What I ended up doing was commenting out lines 89-91 in the system/startup.php file:

Code: Select all

if (is_file(DIR_SYSTEM . '../../vendor/autoload.php')) {
	require_once(DIR_SYSTEM . '../../vendor/autoload.php');
}
and so far it seems to have worked. There are no more of that duplicate line being created in the checked.cache file. I will probably still delete that file on a regular basis just to be safe and to keep the site's performance as optimal as possible.

New member

Posts

Joined
Fri May 19, 2017 8:29 am

Post by synapseindia » Mon Jun 18, 2018 7:39 pm

Great ! (y)

User avatar
Active Member

Posts

Joined
Thu Apr 05, 2018 2:27 pm

Post by RideTheWave » Tue Jun 19, 2018 7:52 pm

Before I deleted the vqmod/checked.cache file, I wish I took a note of how the big the file size was. Like others have mentioned, I can't believe this file got too large to create the fatal memory error. Based on a previous backup, I know that from June 2017 to Jan 2018 (about 7 months), that file size grew to only 7 MB. The fatal memory error says that 268 MB were exhausted and I just can't imagine that file got that large in just 5 more months. Say that file got to around 20 MB (and I'm just estimating), then is it possible that about 15 page loads occurring at around the same time could have caused the memory error? The 20 MB file times 15 page loads = 300 MB (which is greater than the 268 MB that it says in the error message). Is that how vqmod works? Is that checked.cache file somehow utilized in memory every time a page is loaded?

New member

Posts

Joined
Fri May 19, 2017 8:29 am

Post by IP_CAM » Tue Jun 19, 2018 9:36 pm

Well, I use OpenCart Test Shops with up to 110 VqMods, with about 2'000 Products online,
and my vqmod/checked.cache file sizes are all between 10 + 13 Kilobytes in Size, and
by use of a Vqmod Pro Installation, wich covers much more Files than the default VqMod Versions.
You therefore have a massive problem somewhere, and you should get someone, looking into
this.
Ernie
---
checked.cache File Content:

Code: Select all

catalog/view/theme/default/template/product/compare.tpl
catalog/view/theme/default/template/product/manufacturer_list.tpl
catalog/view/theme/default/template/product/review.tpl
catalog/view/theme/default/template/account/address_form.tpl
catalog/view/theme/default/template/account/address_list.tpl
catalog/view/theme/default/template/account/cadastro.tpl
catalog/view/theme/default/template/account/download.tpl
catalog/view/theme/default/template/account/edit.tpl
catalog/view/theme/default/template/account/forgotten.tpl
catalog/view/theme/default/template/account/login.tpl
catalog/view/theme/default/template/account/newsletter.tpl
catalog/view/theme/default/template/account/order_info.tpl
catalog/view/theme/default/template/account/order_list.tpl
catalog/view/theme/default/template/account/password.tpl
catalog/view/theme/default/template/account/recurring_info.tpl
catalog/view/theme/default/template/account/recurring_list.tpl
catalog/view/theme/default/template/account/register.tpl
catalog/view/theme/default/template/account/return_info.tpl
catalog/view/theme/default/template/account/return_list.tpl
catalog/view/theme/default/template/account/reward.tpl
catalog/view/theme/default/template/account/transaction.tpl
catalog/view/theme/default/template/account/voucher.tpl
catalog/view/theme/default/template/account/wishlist.tpl
catalog/view/theme/default/template/affiliate/edit.tpl
catalog/view/theme/default/template/affiliate/forgotten.tpl
catalog/view/theme/default/template/affiliate/login.tpl
catalog/view/theme/default/template/affiliate/password.tpl
catalog/view/theme/default/template/affiliate/payment.tpl
catalog/view/theme/default/template/affiliate/register.tpl
catalog/view/theme/default/template/affiliate/tracking.tpl
catalog/view/theme/default/template/affiliate/transaction.tpl
catalog/view/theme/default/template/checkout/cart.tpl
catalog/view/theme/default/template/checkout/checkout.tpl
catalog/view/theme/default/template/checkout/confirm.tpl
catalog/view/theme/default/template/checkout/coupon.tpl
catalog/view/theme/default/template/checkout/d_register.tpl
catalog/view/theme/default/template/checkout/guest.tpl
catalog/view/theme/default/template/checkout/guest_shipping.tpl
catalog/view/theme/default/template/checkout/login.tpl
catalog/view/theme/default/template/checkout/payment_address.tpl
catalog/view/theme/default/template/checkout/payment_method.tpl
catalog/view/theme/default/template/checkout/register.tpl
catalog/view/theme/default/template/checkout/reward.tpl
catalog/view/theme/default/template/checkout/shipping.tpl
catalog/view/theme/default/template/checkout/shipping_address.tpl
catalog/view/theme/default/template/checkout/shipping_method.tpl
catalog/view/theme/default/template/checkout/voucher.tpl
catalog/view/theme/default/template/common/buttons.tpl
catalog/view/theme/default/template/common/column_left.tpl
catalog/view/theme/default/template/common/column_right.tpl
catalog/view/theme/default/template/common/compr_header.tpl
catalog/view/theme/default/template/common/content_bottom.tpl
catalog/view/theme/default/template/common/content_top.tpl
catalog/view/theme/default/template/common/currency.tpl
catalog/view/theme/default/template/common/home.tpl
catalog/view/theme/default/template/common/language.tpl
catalog/view/theme/default/template/common/maintenance.tpl
catalog/view/theme/default/template/common/oc2_theme.tpl
catalog/view/theme/default/template/common/search.tpl
catalog/view/theme/default/template/information/news_list.tpl
catalog/view/theme/default/template/information/sitemap.tpl
catalog/view/theme/default/template/mail/d_order.tpl
catalog/view/theme/default/template/mail/voucher.tpl
catalog/view/theme/default/template/module/account.tpl
catalog/view/theme/default/template/module/affiliate.tpl
catalog/view/theme/default/template/module/amazon_button.tpl
catalog/view/theme/default/template/module/amazon_login.tpl
catalog/view/theme/default/template/module/amazon_pay.tpl
catalog/view/theme/default/template/module/banner.tpl
catalog/view/theme/default/template/module/bot.tpl
catalog/view/theme/default/template/module/card.tpl
catalog/view/theme/default/template/module/carousel.tpl
catalog/view/theme/default/template/module/category.tpl
catalog/view/theme/default/template/module/ebay_listing.tpl
catalog/view/theme/default/template/module/filter.tpl
catalog/view/theme/default/template/module/fullslider.tpl
catalog/view/theme/default/template/module/google_hangouts.tpl
catalog/view/theme/default/template/module/information.tpl
catalog/view/theme/default/template/module/owlslider.tpl
catalog/view/theme/default/template/module/pp_button.tpl
catalog/view/theme/default/template/module/pp_login.tpl
catalog/view/theme/default/template/module/sidebar.tpl
catalog/view/theme/default/template/module/slideshow.tpl
catalog/view/theme/default/template/module/store.tpl
catalog/view/theme/default/template/module/theme_switcher.tpl
catalog/view/theme/default/template/payment/amazon_checkout_address.tpl
catalog/view/theme/default/template/payment/amazon_checkout_cart.tpl
catalog/view/theme/default/template/payment/amazon_checkout_confirm.tpl
catalog/view/theme/default/template/payment/amazon_checkout_failure.tpl
catalog/view/theme/default/template/payment/amazon_checkout_payment.tpl
catalog/view/theme/default/template/payment/amazon_checkout_success.tpl
catalog/view/theme/default/template/payment/amazon_login_pay_address.tpl
catalog/view/theme/default/template/payment/amazon_login_pay_confirm.tpl
catalog/view/theme/default/template/payment/amazon_login_pay_failure.tpl
catalog/view/theme/default/template/payment/amazon_login_pay_payment.tpl
catalog/view/theme/default/template/payment/authorizenet_aim.tpl
catalog/view/theme/default/template/payment/authorizenet_sim.tpl
catalog/view/theme/default/template/payment/authorizenet_sim_callback.tpl
catalog/view/theme/default/template/payment/bank_transfer.tpl
catalog/view/theme/default/template/payment/bluepay_hosted.tpl
catalog/view/theme/default/template/payment/bluepay_redirect.tpl
catalog/view/theme/default/template/payment/checkout_fi.tpl
catalog/view/theme/default/template/payment/cheque.tpl
catalog/view/theme/default/template/payment/cod.tpl
catalog/view/theme/default/template/payment/firstdata.tpl
catalog/view/theme/default/template/payment/firstdata_remote.tpl
catalog/view/theme/default/template/payment/free_checkout.tpl
catalog/view/theme/default/template/payment/g2apay.tpl
catalog/view/theme/default/template/payment/globalpay.tpl
catalog/view/theme/default/template/payment/globalpay_remote.tpl
catalog/view/theme/default/template/payment/globalpay_response.tpl
catalog/view/theme/default/template/payment/klarna_account.tpl
catalog/view/theme/default/template/payment/klarna_invoice.tpl
catalog/view/theme/default/template/payment/liqpay.tpl
catalog/view/theme/default/template/payment/nochex.tpl
catalog/view/theme/default/template/payment/paymate.tpl
catalog/view/theme/default/template/payment/paypoint.tpl
catalog/view/theme/default/template/payment/paypoint_failure.tpl
catalog/view/theme/default/template/payment/paypoint_success.tpl
catalog/view/theme/default/template/payment/payza.tpl
catalog/view/theme/default/template/payment/perpetual_payments.tpl
catalog/view/theme/default/template/payment/pp_express.tpl
catalog/view/theme/default/template/payment/pp_express_confirm.tpl
catalog/view/theme/default/template/payment/pp_payflow.tpl
catalog/view/theme/default/template/payment/pp_payflow_iframe.tpl
catalog/view/theme/default/template/payment/pp_payflow_iframe_return.tpl
catalog/view/theme/default/template/payment/pp_pro.tpl
catalog/view/theme/default/template/payment/pp_pro_iframe.tpl
catalog/view/theme/default/template/payment/pp_pro_iframe_body.tpl
catalog/view/theme/default/template/payment/pp_standard.tpl
catalog/view/theme/default/template/payment/realex.tpl
catalog/view/theme/default/template/payment/realex_remote.tpl
catalog/view/theme/default/template/payment/realex_response.tpl
catalog/view/theme/default/template/payment/sagepay_direct.tpl
catalog/view/theme/default/template/payment/sagepay_server.tpl
catalog/view/theme/default/template/payment/sagepay_us.tpl
catalog/view/theme/default/template/payment/securetrading_pp.tpl
catalog/view/theme/default/template/payment/securetrading_ws.tpl
catalog/view/theme/default/template/payment/skrill.tpl
catalog/view/theme/default/template/payment/stripe_payments.tpl
catalog/view/theme/default/template/payment/twocheckout.tpl
catalog/view/theme/default/template/payment/web_payment_software.tpl
catalog/view/theme/default/template/payment/worldpay.tpl
catalog/view/theme/default/template/payment/worldpay_failure.tpl
catalog/view/theme/default/template/payment/worldpay_success.tpl
system/engine/action.php
system/engine/model.php
system/engine/registry.php
system/library/_encryption.php
system/library/affiliate.php
system/library/amazon.php
system/library/amazonus.php
system/library/bcrypt.php
system/library/captcha.php
system/library/cart.php
system/library/cba.php
system/library/checkoutfi.php
system/library/currency.php
system/library/customer.php
system/library/document.php
system/library/ebay.php
system/library/encryption.php
system/library/image.php
system/library/length.php
system/library/log.php
system/library/mail.php
system/library/openbay.php
system/library/pagination.php
system/library/play.php
system/library/recaptchalib.php
system/library/request.php
system/library/response.php
system/library/session.php
system/library/tax.php
system/library/url.php
system/library/weight.php
admin/controller/extension/manager.php
admin/controller/extension/news.php
system/helper/json.php
system/helper/utf8.php
system/database/mysqli.php
admin/controller/tool/tweaks.php
admin/language/english/tool/tweaks.php
admin/language/english/LanguageEditor/LanguageEditor.php
admin/model/setting/store.php
admin/controller/common/footer.php
admin/language/english/common/footer.php
admin/view/template/tool/tweaks.tpl

For Sale: Top URL's, including OpenCart V-Pro installed, like seen here:
http://www.bigmax.ch - http://www.ipcam.li - http://www.opencart.li
For Information + URL's offered, please contact me at: jti@jacob.ch
I am NOT available for Custom Support in existing OC Installations!
My Github Repositories: https://github.com/IP-CAM
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by RideTheWave » Tue Jun 19, 2018 9:52 pm

I believe I fixed the problem of my checked.cache file getting large (few posts above). I'm now just curious about the mechanics of VQMOD. I really don't believe my checked.cache file got to 268 MB. My guess is that it got to around 20 MB. Even if it got to 20 MB (or even 50 MB), I'm wondering how the site would have gotten the fatal memory error saying 268 MB were exhausted. With VQMOD, is that checked.cache file somehow loaded into memory multiple times during a visitor's visit to the site? What exactly is done with that file during a visit?

New member

Posts

Joined
Fri May 19, 2017 8:29 am

Post by IP_CAM » Wed Jun 20, 2018 5:57 am

Absolutely nothing is done with this file, it only saves all the file names of those
Files, wich have been altered/cached, due to some VqMod Routines, interacting
with those files, by creating cached modified files within the VqCache Section,
to be used, instead of the Default files. ( as I understand it to explain... )
And this cache-file is called, every time a Page is built, I assume, it's therefore
impossible for OC, to still work efficiently, if it would contain 20 MB of date.
( Valid at least up to VqMod 2.61 ! )
Ernie

For Sale: Top URL's, including OpenCart V-Pro installed, like seen here:
http://www.bigmax.ch - http://www.ipcam.li - http://www.opencart.li
For Information + URL's offered, please contact me at: jti@jacob.ch
I am NOT available for Custom Support in existing OC Installations!
My Github Repositories: https://github.com/IP-CAM
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 19 guests