RO CSVI

Manage timeouts

When doing any kind of import, it is not uncommon to run into timeout problems. There are several reasons for this:

  • The import file is too big for your server settings
  • Retrieving external images takes too much time
  • Incorrect template settings

Why does the server have limits?

The server has limits to prevent you from overloading and possibly bring down the server. This is usual on shared hostings because the hosting provider doesn't want you to trouble your neighbours, same as you don't want your neighbour to bring down the server. If you have a VPS you have more freedom to do what you like as you have more resources available. On a dedicated server you can do as you please as you are the only one on the server, bringing it down will only affect you.

How do I change the server limits?

You can't is the short answer. Hosting providers have these limits in place to make sure the server does not get overloaded on shared hosting accounts. If you have a VPS or dedicated server, you can probably increase the server limits to whatever you have available on your server. Contact your hosting provider on how to do this for your server.

How to change the CSVI import limits?

The import limits used by CSVI can be changed in the template after clicking on the Advanced button. This will show the Limit tab and it's options.

Template limit

By setting the Override system limits to Yes, these settings are activated. On import CSVI will set these settings but this is no guarantee that they will be used. The server can and usually is setup to ignore these settings, on a dedicated server this usually can be used. The advice is not to use these settings unless you are sure they can be used on your server.

The Limit tab contains 2 settings:

  • Lines per import
  • Time between imports
    No need to change this one

The Lines per import is the one we are going to change, as it determines how many lines CSVI should read before restarting. How many lines this needs to be depends on your server. A rule of thumb is that an import run cannot last longer than 30 seconds, so you need to find out how many lines you can process within 30 seconds. A value of 0 means, read the whole file, never restart. Any other value will be the number of lines CSVI processes before restarting.

An example, your file has 5000 lines to import but the import stops at 543 lines because that is what the server can handle in 30 seconds. We set the Lines per import to 400 and save the settings. What happens now is that CSVI process the first 400 lines, waits 5 seconds and restarts. After the restart it reads the next 400 lines, waits 5 seconds and restarts again. This process continues until CSVI has read all 5000 lines and then finalizes the import.

If you find out that with Lines per import set to 400 it still times out, lower the number to 300 and try again. This is always a trial and error process since it all depends on your server.

Large files, what do I need?

You need patience, large files take time to import.

What is the perfect setting for my large file?

There is no answer to this, since it is your file, you will have to test the settings for your file on your server.