6 replies [Last post]
captaindan@drupal.org's picture
Offline
Joined: 09/09/2008
Juice: 28
Was this information Helpful?

Hello!
I have an XML-file and the problem is that I couldn't import the products using native Importer module =(
The file is a very big (82 Mb with 48445 products on the list) but it's created accordingly to this page.
I did try the Importer before, with Ubercart v1.3. I had just 3500 products and everything worked just fine. But for now it doesn't even warn me or display any messages - the page reloads itself in a second or two and nothing happens.
Could anyone please explain me what the reason is?

P.S.: from php.ini

max_execution_time = 36000     ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 1024M      ; Maximum amount of memory a script may consume (128MB)
***
; Maximum allowed size for uploaded files.
upload_max_filesize = 100M
Andy's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 1076
Re: Can't import the products using Importer module

PHP is a little tricky about upload file limits. There are two limit sizes, upload_max_filesize and another one I can not remember (you can find it with a quick search of php upload limits).
Have you checked your error_log file to see if it log's an error?
Peace,
Andy

zeezhao's picture
Offline
Joined: 04/23/2008
Juice: 969
Re: Re: Can't import the products using Importer module

you may need to change post_max_size & upload_max_filesize.

Also see this link for my comments on other php variables that may be relevant (even though this was when using node_import):

http://www.ubercart.org/forum/support/4909/importing_big_databases#comme...

captaindan@drupal.org's picture
Offline
Joined: 09/09/2008
Juice: 28
Re: Re: Re: Can't import the products using Importer module

Thanks a lot for your help.
I've tuned php.ini:

; Document expires after n minutes.
session.cache_expire = 3600

; Maximum size of POST data that PHP will accept.
post_max_size = 100M

max_input_time = 36000 ; Maximum amount of time each script may spend parsing request data

Then it's started to work, but I can import 790 positions only %(
I used to try it twice - the result was the same - 790 out of 48445 positions.
Please, could anyone help me with that? Any help will be highly appreciated!

zeezhao's picture
Offline
Joined: 04/23/2008
Juice: 969
Re: Can't import the products using Importer module

you may have to use the set_time_limit() function within the importer to avoid timeout too. See:

http://www.php.net/set_time_limit

captaindan@drupal.org's picture
Offline
Joined: 09/09/2008
Juice: 28
Yeah, thanks zeezhao. I

Yeah, thanks zeezhao.
I don't use set_time_limit(), because I set up the following directives in PHP.ini.


max_execution_time = 36000     ; Maximum execution time of each script, in seconds
max_input_time = 36000 ; Maximum amount of time each script may spend parsing request data

Any script can work 10 hours.

I think there are some limitations anyway, maybe in MySQL configuration file. cause Importer works about a minute and imports exactly 790 products every time.

Any more suggestions how to get it working?

zeezhao's picture
Offline
Joined: 04/23/2008
Juice: 969
Re: Yeah, thanks zeezhao. I

What I found in loading about 1.8 million products in batches of 500,000 is that even though php.ini had adequate exec time, I still needed the set_time_limit(). I think there is also one somewhere in drupal files. Use grep to find it.

Also, ensure mysql has enough memory in your my.cnf.