Jump to content
  • 0
AFemaleProdigy

500 Internal Server Error on CSV Import

Question

I apologize upfront because I know this issue has been posted before. However, none of the existing threads have helped me.

 

I am trying to import a large number of products into my brand new installation of Prestashop. I have tried several means of getting this import to work, to no avail. No matter what I do, I get a 500 Internal Server Error message and nothing is imported. This is what I have tried:

  • Splitting up the csv file down to 80 product increments.
  • Electing to ignore the image url columns so no images are imported.
  • Added a php.ini file to increase set_time_limit, max_execution_time, and memory_limit to large numbers.

None of that has worked and I am not able to get the import to work. Help, please?

Share this post


Link to post
Share on other sites

29 answers to this question

Recommended Posts

  • 0

Did you check if the changes to php.ini are being used?

Create a php file with phpinfo() and see if the new values are reflected there.

 

If you have access to the main server error log (usually from cpanel), you can try to see the exact error (error 500 is generic).

Share this post


Link to post
Share on other sites
  • 0

These are the settings I have (that are available). It seems to be working in the php.ini, but I am still getting the error. Even when only trying to import 80 products. In the error logs, I don't see anything pertaining to what I am trying to do.

 

http://www.xxxvipclub.com/phpinfo.php

Share this post


Link to post
Share on other sites
  • 0

Try to run it again, and check the error log for anything with the current time, or your IP address.

 

Do you get the same error if you have only 1 record in the file?

Share this post


Link to post
Share on other sites
  • 0

Me too. I need to import a lot of products yet I can't get it past about 150 at a time.

 

I'm using the latest version of prestashop according to the upgrade button

 

I have a few thousand to import and this is really getting to be a pain to the point I'd wished I'd stuck with my previous cart.

 

Does someone have any hints or settings for htaccess or php.ini that could help?

Edited by paulcreedy

Share this post


Link to post
Share on other sites
  • 0

Put this code in your .htaccess at the end:

<IfModule mod_php5.c>
php_value post_max_size 2000M
php_value upload_max_filesize 2000M
php_value max_execution_time 18000000
php_value memory_limit  512M
</IfModule>

However, if you have images to import as well, you will need to do them separately somehow, as resizing them takes time and that's why you get an error.

Share this post


Link to post
Share on other sites
  • 0

Thanks. I'll give it a go.

 

Yes, lots of images but I don't know how else to get them on there.

 

Pretashop is a real pain when it comes to importing. Never had this much trouble with my previous cart.

Share this post


Link to post
Share on other sites
  • 0

I've tried the htaccess thing and I've contact my host who told me to increase similar in the php.ini file

 

I'm consistently getting 172 in at a time, no more.

 

My host says from the log files and error messages, the script is using a huge amount of memory to run. I'm wondering if the code is leaking a lot of memory and not cleaning up after itself, thus using more memory that it should.

Share this post


Link to post
Share on other sites
  • 0

I've tried the htaccess thing and I've contact my host who told me to increase similar in the php.ini file

 

I'm consistently getting 172 in at a time, no more.

 

My host says from the log files and error messages, the script is using a huge amount of memory to run. I'm wondering if the code is leaking a lot of memory and not cleaning up after itself, thus using more memory that it should.

 

So what is solution? How can I manualy clean memory after import?

 

Best regards

Share this post


Link to post
Share on other sites
  • 0

I also notice when is importing over (after error) I visit my site after 15 minutes there are about 50 new products without pictures. Anybody know why?

Share this post


Link to post
Share on other sites
  • 0

reduce the languges that you are using or not using in the backoffice. By default Prestashop is entering I belive 5 languages for you. This causes you to quickly hit the hourly query limit set by many hosting providers. Think of it like this: for 80 product entries its 80 X 5 languages X the number of cells in your csv file X the number of tables queryed by the importer = quereys that will be counted by your host.

Share this post


Link to post
Share on other sites
  • 0

This might help:

 

In your php.ini file you need to increase the memory limit as you have already done.

But you should also add this:

 

max_input_vars = 3000;
suhosin.post.max_vars = 3000;
suhosin.request.max_vars = 3000;

 

See http://www.webmaster...prestashop.html

Edited by TWDesign

Share this post


Link to post
Share on other sites
  • 0

From what I saw from importing 30k products to PS 1.5.2:

1. MyISAM is 30 times faster than INNODB

2. If You are using mysql 5.6 server and You check to "delete all products" You will recive 500 error. Its caused by bad TRUNCATE queries (they work in mysql <= 5.5).

3. If You check "delete all products" PS wont truncate `ps_feature_value` and `ps_feature_value_lang` tables. It cause me some problem....

4. After some changes I was able to import 30k products (without photos) in about 20 minutes (all had about 15 feature values...)

 

Greetings

Share this post


Link to post
Share on other sites
  • 0

From what I saw from importing 30k products to PS 1.5.2:

1. MyISAM is 30 times faster than INNODB

2. If You are using mysql 5.6 server and You check to "delete all products" You will recive 500 Error. Its caused by bad TRUNCATE queries (they work in mysql <= 5.5).

3. If You check "delete all products" PS wont truncate `ps_feature_value` and `ps_feature_value_lang` tables. It cause me some problem....

4. After some changes I was able to import 30k products (without photos) in about 20 minutes (all had about 15 feature values...)

 

Greetings

 

Can on switch from INNODB to MyISAM in-place? Or does it require a reinstall of prestashop?

Edited by Alexanderm920

Share this post


Link to post
Share on other sites
  • 0

WHICH FILES IN THE CONFIG FOLDER HAS TO BE MODIFIED IN ORDER TO INCREASE THE ELABORATION TIME AND SO MORE PRODUCTS IMPORTED THAN BEFORE?

Share this post


Link to post
Share on other sites
  • 0

I'm on a godaddy shared hosting server and made all the changes above still getting 500 error first i got 

mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
this was caused by changing the htaccess file when I put it back I got
mod_fcgid: read data timeout in 120 seconds
That error is specific to mod_fcgid, not PHP itself. If you're using the current version of mod_fcgid then you will need to set the FcgidIOTimeout directive (ref), otherwise you'll need the old directive, IPCCommTimeout
If you check out the documentation it says 
Context: server config, virtual host
which I'm assuming I can't change on a shared server
Since I'm a newbie if anyone has any other comments or suggestion let me know 

Share this post


Link to post
Share on other sites
  • 0

I apologize upfront because I know this issue has been posted before. However, none of the existing threads have helped me.

 

I am trying to import a large number of products into my brand new installation of Prestashop. I have tried several means of getting this import to work, to no avail. No matter what I do, I get a 500 Internal Server Error message and nothing is imported. This is what I have tried:

  • Splitting up the csv file down to 80 product increments.
  • Electing to ignore the image url columns so no images are imported.
  • Added a php.ini file to increase set_time_limit, max_execution_time, and memory_limit to large numbers.
None of that has worked and I am not able to get the import to work. Help, please?

 

 I I'm running same issue on "PrestaShop™ 1.5.6.2"

 

Could anybody please let me know, how to change / add / php.ini file.

 

Thanks you.

LK.

Share this post


Link to post
Share on other sites
  • 0

you have to set up error logging to see whats causing the 500 error I'm a newbie and cant tell you exactly how to do that but some hosting companies like godaddy have have a user interface to do that if you dont have that option google how to set up a php.ini file or user.ini file that can do that

Share this post


Link to post
Share on other sites
  • 0

Can on switch from INNODB to MyISAM in-place? Or does it require a reinstall of prestashop?

 

Yes, You can. But after some more reading i found some ways to reconfigure mysql to work faster with InnoDB.

 

First of all change "innodb_flush_log_at_trx_commit" to 0 or 2. More to read about speed-up here: http://dev.mysql.com/doc/refman/5.1/en/innodb-tuning.html

Share this post


Link to post
Share on other sites
  • 0

 I I'm running same issue on "PrestaShop™ 1.5.6.2"

 

Could anybody please let me know, how to change / add / php.ini file.

 

Thanks you.

LK.

 

Can You send sample .csv file with some products? It would be easier to check ;)

Some times it's simple stuff like hash in bad place :)

Share this post


Link to post
Share on other sites
  • 0

If you have vps you can change the values of the php.ini file if you have shared hosting check their docs where and how and if you can to place an php.ini file. You have to find online default php.ini file for version of php that you running and changes the values you like changed

Share this post


Link to post
Share on other sites
  • 0

Update for all:

When you get error 500, import still working. 
Open console, type command "top" and you will see processes on your machine. If mysql and apache taking big part of your RAM memory and CPU usage everything is good.

Share this post


Link to post
Share on other sites
  • 0

Update for all:

 

When you get error 500, import still working. 

Open console, type command "top" and you will see processes on your machine. If mysql and apache taking big part of your RAM memory and CPU usage everything is good.

 

 

What do you mean by 'Console' please? 

Share this post


Link to post
Share on other sites
  • 0

What do you mean by 'Console' please? 

 

Sorry for delay.  If you have SSH root access for your server you need to access via console. Also known as "terminal". Download putty software and access. Then you can write "top" command and u will have all info about your resources.

Share this post


Link to post
Share on other sites
  • 0

Hi,

 

I had the same porblem. It was solved this way:

In Performance change cache option. There are two options. Don't cache every change in files.

 

Hope this helps.

 

Regards,

What he (she) said! +1!!!!!!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More