Предисловие
PHP — это модуль, работающий поверх Apache [HTTPD Server], который включает в себя связывание интерпретатора php с библиотекой хуков, опубликованных веб-сервером.
Причина
Now it can exhaust due to scripts running allocating memory [RAM] & reach its threshold & get such errors.
Example big loops running & saving lots of data in memory which may over RUN the Memory
Возможная оптимизация, которую вы можете сделать
memory_limit = 32M to your server's main php.ini file (recommended, if you have access)
php_value memory_limit 32M in your .htaccess file in the
Это некоторые обходные пути для страниц, на которых у вас не хватает памяти.
ini_set('memory_limit', '-1'); overrides the default PHP memory limit (On individual php pages wherever you need extra memory)
Также вы можете выполнить некоторую оптимизацию на HTTP-сервере (apache.conf или http.conf).
RLimitCPU,RLimitNPROC, RLimitMEM parameters can be adusted
Поскольку у вас заканчивается память, вы можете настроить RLimitMEM
Syntax: RLimitMEM soft-bytes [hard-bytes]
Example: RLimitMEM 1048576 2097152
This directive sets the soft and hard limits for maximum memory usage of a process in bytes. It takes one or two parameters. The first parameter sets the soft resource limit for all processes. The second parameter sets the maximum resource limit. Either parameter can be a number, or ``max'', which indicates to the server that the limit should match the maximum allowed by the operating system configuration. Raising the maximum resource limit requires the server to be running as the user ``root'' or in the initial start-up phase.
Вы также можете поместить строки в файлы .htaccess [поскольку на виртуальном хостинге у вас не было доступа к файлам php.ini и http.conf
person
Ashish
schedule
29.10.2014