0

The server is hosted by JustHost and on there are a few separate domains. I am uploading files to wordpress blog on one of the domains and my import only gets through 1332 records each time.

I think this is because there is not sufficient amount of data allowed to upload. I have changed the PHP.ini and it is now really fast, but still same number of records are uploading.

I have put a PHP ini in the public HTML folder and also one in the site route domain folder but am still getting the same results.

post_max_size = 500M
upload_max_filesize = 400M
max_execution_time = 3000
max_input_time = 6000
memory_limit = 2200M 

I have also put this line in the wordpress config file

define('WP_MEMORY_LIMIT', '2200M');

Any suggestions?

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 44 bytes) in /home/divethe1/public_html/callinggrove.co.uk/wp-includes/kses.php on line 991

RIK
  • 17,723
  • 34
  • 107
  • 185
  • 1
    Check your logs to see what's causing the execution to end. Timeout, or memory limit, or something else. – xbonez Jun 12 '12 at 18:51
  • Found an error what does it mean Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 44 bytes) in /home/divethe1/public_html/callinggrove.co.uk/wp-includes/kses.php on line 991 – RIK Jun 12 '12 at 19:04
  • Take a look at this: http://stackoverflow.com/questions/415801/allowed-memory-size-of-33554432-bytes-exhausted-tried-to-allocate-43148176-byte – miqbal Jun 12 '12 at 19:05
  • @RobinKnight: That's a pretty explanatory error. You're running out of memory. Your php.ini has memory_limit set to 2200M which I highly doubt you could run out of. However, if you're on a shared host, it is possible that the memory_limit is predefined and not overridable by your php.ini. – xbonez Jun 12 '12 at 19:07

2 Answers2

0

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 44 bytes) in /home/divethe1/public_html/callinggrove.co.uk/wp-includes/kses.php on line 991

This kind of error is caused by a memory leak in your code its not related to your server config, your building a string or storing a value that is exponentially being assigned growing by its own value on each iteration.

<?php //$str is added to $str
$str = str_repeat('abc',1000);
for($i=0;$i<=100;$i++){
    $str = $str.$str;
}?>

or in your case your perhaps building an array of the posts you have added with the entire content added to a value and its running out of memory.

Plz post some of your code around where the error occurs.

Lawrence Cherone
  • 41,907
  • 7
  • 51
  • 92
  • this sounds quite likely as I don't really know what I'm doing I'm just persistent. I'll upload some code shortly. For now My get around has been to upload 1000 posts at a time but just so that you know, it runs out at nearly the exact number uploaded each time – RIK Jun 13 '12 at 13:43
-3

If possible try to use a persistent connection.

I don't know if you can do that using wordpress.

Vic Abreu
  • 493
  • 4
  • 12