Open aimalkhan opened 1 month ago
NB 320MB is larger than CKAN allows by default. If you're going to adjust settings to allow it, you might need to also adjust your database accordingly, increasing the server capacity or lengthening timeouts.
Yes, and adjusting db settings do work. The issue is that the processing time of files is not fixed, say, for when there are multiple files being processed. I was thinking a more flexible solution will be for xloader to check for connection and retry connection at each step it needs one. Is that something worth looking into for a contribution, or is this a special case that others users never encounter?
I was thinking a more flexible solution will be for xloader to check for connection and retry connection at each step it needs one.
Hmm. There is already a retry facility, but it is specific to locking errors. Do you want to check whether it could be expanded to include connection timeouts?
On the other hand, if a resource takes too long once, it will probably take too long the second time as well.
We are running into an issue with DB connection when processing larger files. It seems like xloader assumes that the db connection will be open for the duration of the file being processed, which is not always the case. In the example below the 360MB file takes ~20mins in the
column indexes created
stage, which is usually too long for usual DB server idle-timeout settings. The quick fix is to increase the server's idle-timeout, but that does not scale well. Are there any other suggestions that we can use, perhaps check for sql connection at each step and re-establish the connection if it does not exist?xloader log: