워드프레스 메모리 에러 해결 법 wordpress Fatal error: Allowed memory size of 83886080 bytes exhausted (tried to allocate 76 bytes) in

워드프레스 메모리 에러 해결 법 wordpress Fatal error: Allowed memory size of 83886080 bytes exhausted (tried to allocate 76 bytes) in

왜 이런 일이 발생하는지는 모르겠다. 아마도 메모리를 많이 사용해서 발생하는 일 같은데...

구글링을 통해서 검색을 해보니..

ini_set("memory_limit","150M");
ini_set('memory_limit', '-1');

이렇게 2개로 귀결되는 것 같다. 위에 것은 메모리를 더 늘려주는 것이고 아래 것은 아예 무한대로 설정하는 것 같다.
쉐어호스팅일 경우에 문제가 발생 할 수 있으니 자신의 php메모리 확인 후 그때 그때 늘려주는게 좋을 듯 하다.

아래의 phpinfo.php 를 자신의 웹서버에 올리고 url로 보면 php 메모리 정보가 나온다. 나 같은 경우는 80mb였다.  이것을 초과해서 경고가 뜬 것인데..

150mb늘려 주는 코드를 cache.php 상단에 넣어주니 해결이 되었다.
하지만 다른 코드들에서 여전히 다른 에러들이 발생하고있다.



wordpress Fatal error: Allowed memory size of 83886080 bytes exhausted (tried to allocate 76 bytes) in



아래는 cache.php 상단에 메모리 용량을 정의해준 모습

<?php

ini_set("memory_limit","150M");

/**
 * Object Cache API
 *
 * @link http://codex.wordpress.org/Function_Reference/WP_Cache
 *
 * @package WordPress
 * @subpackage Cache






아래는 관련하여 찾아낸 블로거들의 주소이다.


http://stackoverflow.com/questions/415801/allowed-memory-size-of-33554432-bytes-exhausted-tried-to-allocate-43148176-byte

At last I found the answer:

ini_set('memory_limit', '-1');

It will take unlimited memory usage of server, it's working fine.

Thanks for giving suggestion friends.




 

http://www.wallpaperama.com/disp-post83.html

A customer complaint about getting an error on their website:


Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 42 bytes) in
/var/www/web1/web/forums/includes/adminfunctions_template.php on line
2214

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 16 bytes) in
/var/www/web1/web/forums/includes/class_core.php on line 2868

 

The Basics: Run a phpinfo file to display the configurations in the php.ini file. 

look at where it says memory_limit - It will mostly like say 8MB which is the default.

Now edit your php.ini file to 20MB. Restart your httpd (apache) server.

If this doesn't work, you will have to edit your script ad put this code at the very top:

ini_set("memory_limit","20M");



워드프레스 메모리