CDB-4425 Fixing OOM scenario upon import

https://cartodb.atlassian.net/browse/CDB-4425