0

We are trying to export 30000 records but it's showing the following error in wordpress :

PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 49152 bytes) in Unknown on line 0, referer: https://xxxxxxxxxx

We tried to increase the memory size from 128M 256M 512M but still showing the same error Tried with php.ini and wordpress define( 'WP_MAX_MEMORY_LIMIT' , '512M' );

Even tried with 1G.

Observation is upto size 256 getting internal error 500 and after that not getting that internal error 500 but not able to export.

How to solve this issue? in disk there is 715MB space available.

Kushal
  • 6,695
  • 6
  • 48
  • 72
ThunderStorm
  • 125
  • 1
  • 1
  • 11
  • Does this answer your question? [Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php](https://stackoverflow.com/questions/415801/allowed-memory-size-of-33554432-bytes-exhausted-tried-to-allocate-43148176-byte) – ttrasn Dec 18 '19 at 10:25
  • No, it's not working for us. We've checked already. – ThunderStorm Dec 18 '19 at 10:37
  • Can you export in smaller multiples, 10k per export? – David.J Dec 18 '19 at 10:43
  • No, we're not able to export any amount here. Is it a problem of hard disk? As i could see one difference between all other 10 servers and this one. Here available disk space is 715MB and in other servers available disk space is more than 3 GB – ThunderStorm Dec 18 '19 at 10:50

2 Answers2

0

Try setting your max_execution_time in your php ini file to something bigger. Could be a script timeout.

Mark Biwojno
  • 55
  • 1
  • 1
  • 7
  • No, it's not a max_execution_time problem as we are using same set of files for different server. There we are able to export 80000 data. here we are not able to export 30000. for both max_execution_time = 30 – ThunderStorm Dec 18 '19 at 10:42
  • Are the servers identically configured and the data being the same size per record? 30 seconds is not long. – Mark Biwojno Dec 18 '19 at 11:07
  • Yes, all them are identical in size per record. – ThunderStorm Dec 18 '19 at 11:13
  • Okay. Sounds like that server as an issue somewhere. You could use an SSH connection via a tool like MySQL workbench to export the data, going around WordPress as a workaround. Alternatively, phpmyadmin if you don't have SSH access. Then once you got the data, process it if needed in the working server. – Mark Biwojno Dec 18 '19 at 11:20
  • Trying with disk space increasing – ThunderStorm Dec 19 '19 at 10:04
0

Finally it's working when we've increased the disk space to 20 GB.

ThunderStorm
  • 125
  • 1
  • 1
  • 11