Jump to content

500 Internal Server Error on CSV Import


Recommended Posts

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?

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...

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 (see edit history)
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 5 months later...

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

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
Share on other sites

  • 2 months later...

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 (see edit history)
Link to comment
Share on other sites

  • 9 months later...

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 
Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 years later...
  • 2 months later...
  • 5 weeks later...
  • 1 month later...

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? 

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 2 months later...

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
×
×
  • Create New...