Jump to content

Help: Internal server error when importing


Recommended Posts

I am trying to import a list of about 500 products.
On my local machine (XAMPP) it works ok, on the live site I am getting a 500 internal server error.

All my products have an image URL associated with them, all images are local

I am guessing this is some timeout problem.

I would much rather not have to split the import files, since they are generated automatically and I have a lot of products to import, and I do that import on a regular basis.

Can someone help?

EDIT:
I have contacted my host, and it appears that the import process is hitting my memory limit.
Considering the fact that the CSV file is not too large (400 lines, 400kb), I would say the import process requires some optimization.

I am guessing it has something to do with the thumbnail generator so maybe there should be a way for me to check a checkbox that says "Generate new thumbnails only" which, when checked, will not bother to regenerate all thumbs, but only the ones it doesnt find on the disk.

Link to comment
Share on other sites

Help, I just tried importing a categories csv, this has previously worked today, but now shows error below.
I cannot add or delete categories, is it a bug ? do I need a patch ?

"The server encountered an internal error or misconfiguration and was unable to complete your request

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

Really appreciate help !!

thanks
Paul

Link to comment
Share on other sites

Try to split your file into smaller parts. See if this solves it.

If you are testing this on a shared host, you are probably facing the same problem I have faced which is a memory limit that your host enforces.
Seems the import process is not too efficient (to say the least).

Link to comment
Share on other sites

Hi, thanks for your reply.

I was importing 27 lines of categories into the home category. I had previously done this today without problem. (3kb)
csv file has ID column starting from 2 - Name Category column - Description column- Parent Category column,
then hack attempt warning apeared, then the 500 internal server error, plus the 404 not found error.

(I'm using UK2 net server, I was using UK2 ecommerce (tradingeye) but that didnt work, now looking at prestashop)

internal server error 500 - this has resulted in me being unable to delete the last subdirectory under home or add any categories.
Any ideas ?

Hack attempt (Category->link_rewrite is empty for default language)


If the remaining category is corrupted can I remove it using phpadmin? if so what do i need to look for ?

many thanks
paul

Link to comment
Share on other sites

Hmmm..

27 lines should not be a problem
I faced memory problem at around 400 lines

I am guessing you do not remember what change you made since the last time it worked?
If I were you, I would try to do this:
1. See if you can undo your last changes, and go back to a working CSV
2. If not, start removing lines from the CSV, see if any specific line causes it
3. If not, start removing/emptying columns, see if you have any bad information in one of them
4. If not, create a new CSV, as simple as you can - only one or two products and only with the mandatory fields, starting from ID 1.

If any of the above steps make it work again, start building slowly on top of it to see where exactly is your error.
I spent the last 3 days "spitting blood" over this import process - it is very delicate, and when it has an error, it doesnt always tell you where exactly.

If you want, give me a small part of your CSV (the smallest you can) and I will take a look.

Link to comment
Share on other sites

http://www.prestashop.com/forums/viewthread/13047/general_discussion/tutorial_on_how_to_import_categories_and_subcategories_with_csv

I imported over 300 categories and 2000 products with no problem in 1.1 and 1.2.... Try this method first....


Thanks for sharing, personally, I found this method to be too labor intensive.
I went into the PHP code, and changed the delimiters to the ones I want to use
I chose characters that should never appear in any field, like ~ and |

I also made the "remove all products before"... to be checked by default, since I always reload the entire catalog.

Also, I found it much easier to create the CSV with ALL the columns, at exactly the same order, this way you do not have to redefine everything with every upload.
If you ask me, Presta should remember your settings whenever you change something in this screen, but thats probably for later releases.

I dont see how you were able to import 2000 products with images on a shared server.
I think it is the image generator that takes a lot of time and a lot of memory, so if you have a long list with no images, it will probably work ok, but I had a list of 400 products, all with local image urls, and my shared host interrupted the running of the script due to memory over-consumption.

Lastly, if you have some scripting skills in any language that can create files, I would recommend creating your own script that migrates your CSV input from a convenient format to the format accepted by Presta
For example, I had my script automatically create Tags (out of the name) and meta description/title etc out of other fields.
  • Like 1
Link to comment
Share on other sites

Hi,

Thanks all for your suggestions. The main problem before I try and import the csv category file is that I cannot delete a category under "home category" that still remains (and which may be the problem) using presta admin.

Each time i click on the categories of which there are 2 under home category it keeps looping around between them. I can't delete them. I was wondering if there was a way of finding them using phpadmin and remove them from there?

***500 Internal server error is preventing me using presta admin to delete the problem categories, will I need to reinstall presta ?? *** Am using presta version 1.1.0.5 - 0.111s

Then re - import categories back into the home category once the above fixed ?

Thanks

Paul

Link to comment
Share on other sites

If you are unable to delete a category, then this sounds like a good sign that the problem may be a corrupted DB.

If you have created a backup of your DB in the past, I would recommend restoring it, and then deleting.
Otherwise, go to phpMyAdmin, and take a look at these tables:

"ps_category",     
"ps_category_lang",
"ps_category_product",
"ps_image",
"ps_image_lang",
"ps_image_type",
"ps_product",
"ps_product_attribute",
"ps_product_attribute_combination",
"ps_product_lang",
"ps_product_tag",



These are the tables that hold the catalog.
Do your damage there :)
(this suggestion is provided AS IS and without warranty.... :) )

Link to comment
Share on other sites

many thanks will look at it now

well..... looking at ps_category this is what I have. Am I correct in thinking its looping around ? May be better to create a new database, how would I link in a new database to presta ?

id catagory - id_parent - level depth - active - date_added - date_upd
1 -----------------2-------------22------- 1
2 -----------------3-------------21------- 1
3 -----------------1-------------23 ------ 1

many thanks for all your help !

Paul

Link to comment
Share on other sites

  • 2 years later...

I think it is the image generator that takes a lot of time and a lot of memory, so if you have a long list with no images, it will probably work ok, but I had a list of 400 products, all with local image urls, and my shared host interrupted the running of the script due to memory over-consumption.

 

Same Problem here. Can not import more than 100 CSV-Links with external Images included.

But i got only a Internal Server Error... but don't know, what exactly goes wrong.

Problem cause in imageResize-Function of Presta.

Realy strange behavior!

Link to comment
Share on other sites

Same Problem here. Can not import more than 100 CSV-Links with external Images included.

But i got only a Internal Server Error... but don't know, what exactly goes wrong.

Problem cause in imageResize-Function of Presta.

Realy strange behavior!

 

Hi rethus,

This is an issue with a server timeout with your hosting provider. You will want to give them a call to see if they can increase it for you (at least temporarily) so that you can complete the import.

 

I hope this helps.

 

-Mike

Link to comment
Share on other sites

×
×
  • Create New...