Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I tested build site locally on xammp, has datafeeds that are read in using for example this xpath

/products/product[contains(categorie,'Kinderwagens')]

Now it works perfectly locally but not on my VPS, I'm using the wp import all plugin btw

  • I have direct admin
  • when I try just /products/product I can import
  • when I try full /products/product[contains(categorie,'Kinderwagens')] not much happens It says Import XML error and then the line "Composing contents..." comes and just doesn't do anything anymore.

These are server settings altho this shouldnt be the prob as it does import with the [contains(categorie, 'Kinderwagens')]

Your server setting

upload_max_filesize 96M post_max_size 72M max_execution_time -1 max_input_time 300

What I tried

  • -Increasing max filesize, post max size, max input time
  • Cutting the XML file in pieces to decrease its size even 100 record wont work
  • Giving entire plugin folder complete write and excute rights
  • Making sure tmp folder is open for writing

REQUEST ADDITIONAL INFO

Nothing in error logs around the time of my trying to import only these type of error but they dont relate i think

[Tue Aug 28 01:58:21 2012] [error] [client 210.51.xx.xx] File does not exist: /var/www/html/404.shtml
[Tue Aug 28 01:58:22 2012] [error] [client 210.51.xx.xx] File does not exist: /var/www/html/phpMyAdmin-2.5.7-pl1
[Tue Aug 28 01:58:22 2012] [error] [client 210.51.xx.xx] File does not exist: /var/www/html/404.shtml
[Tue Aug 28 08:21:58 2012] [error] [client 66.249.xx.xxx] File does not exist: /var/www/html/robots.txt
[Tue Aug 28 08:21:58 2012] [error] [client 66.249.xx.xxx] File does not exist: /var/www/html/404.shtml
[Tue Aug 28 12:28:53 2012] [error] [client 66.249.xx.xx] File does not exist: /var/www/html/robots.txt

REQUESTED ADDITIONAL INFO 2

Turned on php error loging in php.ini file now when i run the file i get

Importing https://datafeedurl.com (1 of 1) Composing contents... Fatal error: Out of memory (allocated 194772992) (tried to allocate 55554793 bytes) in /home/admin/domains/domain.nl/public_html/aanbieding/wp-content/plugins/wpallimport/libraries/XmlImportParser.php on line 50

share|improve this question
    
Can you see anything in your error logs? I was thinking that it may be an out of memory issue since evaluating XPath expressions on large XML files can take quite a bit of memory, depending on the XML parser used. And does WP stand for WordPress? –  brain99 Aug 28 '12 at 22:57
    
Thats how the plugin is called WP Import all, its a wordpress plugin yes. The file is 15K records big. I does give Import XML error instantly tho and then give the line "composing contents" and seems to be not doing anything anymore. –  Bram Aug 28 '12 at 23:06
    
I dont think its a memory issue tho the setting on my VPS are higher then locally, and out of experience my VPS is much faster executing SQL and importing datafeeds then my local xampp server –  Bram Aug 28 '12 at 23:18
    
Do you have a separate PHP error log? If not, make sure PHP logging is enabled. If it already is, is there anything in there? If not, try increasing the log level. The logs you posted seem indeed unrelated to your current problem. And indeed, seeing as even 100 records won't work memory probably isn't the issue. –  brain99 Aug 28 '12 at 23:20
    
K turned on php error log in vps and now I get this error when I run the pluging import (i get that msg in wordpress itself). It does same like a memory issue now, maybe when I tried 100 I had some unrelated error that since has been fixed –  Bram Aug 28 '12 at 23:31
show 1 more comment

1 Answer

up vote 0 down vote accepted

Going by your error log, you don't have enough memory allocated in PHP.

The script already has 185MB, and tries to allocate an additional 52MB (for a total of 237MB).

In your php.ini, set memory_limit to something higher. Or if it is only temporary (and your global config allows this), you could do this in a .htaccess file as well: php_value memory_limit 512M

After changing php.ini, you need to restart your webserver. With .htaccess that is not necessary.

share|improve this answer
    
I changed memory limit to 512MB, now I get this error Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 27777397 bytes) in /home/admin/domains/domain.nl/public_html/aanbieding/wp-content/plugins/wpallimp‌​ort/libraries/XmlImportParser.php on line 52 which happens to be 256 MB or the limit of my VPS even tho I set memory limit to higher. Seems like the file is too big for my VPS no choice but to cut it in parts. Thanks a ton for all the hlep –  Bram Aug 29 '12 at 0:11
    
With 512MB you should at least be able to use parts a bit bigger than a mere 100 records at a time. –  brain99 Aug 29 '12 at 0:13
    
Yea I think when i tried 100 records, I made a mistake somewhere else. Cause I tried 10000 now and that goes with 256 MB (VPS is max 256MB), 15000 records (entire file size) doesnt go with 256MB, Ill just split the import in 2 for now and untill I get my VPS upgraded, once again thx a ton for the help –  Bram Aug 29 '12 at 3:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.