0

Certain users are getting a memory error on the a VQMOD-generated page in OpenCart reporting that the script has allocated nearly a gigabyte of memory! (1046478848 bytes)

The reported page is vq2-system_library_cart.php and the error occurs upon login when a customer has a "saved cart".

OpCache info contains the following for the offending page:

'/Users/username/Sites/mzoo/pcolacoop/vstore/vqmod/vqcache/vq2-system_library_cart.php' => 
    array (size=6)
      'full_path' => string '/Users/username/Sites/mzoo/pcolacoop/vstore/vqmod/vqcache/vq2-system_library_cart.php' (length=87)
      'hits' => int 6
      'memory_consumption' => int 155144
      'last_used' => string 'Wed Aug 13 18:22:29 2014' (length=24)
      'last_used_timestamp' => int 1407972149
      'timestamp' => int 1407971667

Using xDebug shows calls to 6 functions on vq2-system_library_cart.php, which contains the Cart class: __construct, getTaxes, countProducts, getSubtotal, hasShipping and getProducts (getProducts is called 5 times).

But in the xDebug trace, I'm not seeing vq2-system_library_cart.php at all.

Here's the entire page of code on PasteBin.

How else I might be able to track down the cause of this memory error?

(On a side note, VQMOD makes nearly 10,000 calls between VQNode -> getContent and VQModObject -> applyMod, which seems like a lot.)

MikeiLL
  • 6,282
  • 5
  • 37
  • 68
  • 1
    Hi Mike - I'm one of the two vQMod engine developers and have just sent you an e-mail regarding the large number of calls to applyMod - As for the memory usage, since it points to the cart class, it's going to be either /system/library/cart.php (unlikely) or a vQmod you've added which modifies the file that's causing that - not the vQmod engine itself – Jay Gilford Aug 14 '14 at 00:50
  • @JayGilford definitely didn't expect it was the vQmod engine causing it. And expect it is one of the mods I've added. Just at a total loss as to how to track it down. I wonder if it's behaving differently on the RedHat server from my virtual machine (MAMP). – MikeiLL Aug 14 '14 at 01:34

0 Answers0