Memory in Jomres

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 however 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. Mambo & Joomla themselves both need 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.

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