Memory in Jomres

From Jomres v4 manual

Jump to: navigation, search

Why

One item that should be born in mind is that Jomres can be very resource hungry. It has been optimised as much as possible to generate as few database queries as possible by preloading a lot of data. This is particularly true in the Property List and Booking Engine functionality. We achieve this by running a handful of queries and storing this information in arrays.

This allows us to run a lot of complex code for example in the booking form very very quickly. This means that data that needs to be regularly looped through is instantly available, rather than pulling it from the database but it does mean that Jomres can have very high memory requirements and it is not unusual to get out of memory errors from PHP.

The default 8Mb that most PHP builds have available simply isn't enough. Joomla itself needs almost all of this 8Mb simply to run and adding Jomres on the top will definately mean that you will run out of memory. To alleviate this Jomres tries to use an internal PHP function to increase the amount of memory allocated to PHP, however not all servers allow this command to be run and you may need to manually modify php.ini to increase the memory available. Jomres by default tries to set the memory to 128Mb as this is the preferred setting for large systems or systems that make heavy use of the Micromanage tariff mode, but you may well be able to set your memory limit lower to something like 16Mb, 32Mb or 64Mb depending on your requirements.

What to change

If you're suffering from out of memory errors, you can try editing your php.ini if you have access to it, and raise the limit a bit like so :

memory_limit 20M

Note that you may need to try different memory limits until the problem disappears.

Alternatively, if your hosting service allows you to, you may also be able to use a ".htaccess" file to raise the limit:

php_value memory_limit 20M

Other considerations

Other modules and plugins (mambots) in Joomla can contribute to out of memory problems simply due to their existance. If at all possible, if's a good idea to try to have a minimum number of modules showing on the same pages as the Jomres application itself.

Two other Joomla plugins can greatly contribute to the memory consumption in your Joomla install: Joomfish and SEF (particularly sh404SEF). Joomfish to a lesser degree, but to a greater degree sh404SEF. This isn't by the way a criticism of either of these plugins, they're great applications in their own right. Rather, I raise the point to illustrate to the site manager (you) that these other plugins may bring their own set of problems, and that you need to be aware of them.

Personal tools