Hi, I am looping through a number of text files and fixing them. I get heap space errors.
Once I have finished processing an individual file is there any way I can clean up so I don't get the Heap issue?
Heap Space
Moderators: Jon, Steve, Ian, Dave
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
Yes. I've since establlished that it is actually a couple of really big files (c.500Mb) that are causing the issue.
I'm listing files in a folder then iterating through them and reading the content before writing a new file.
MS SQL bulk insert not being able to handle text qualifiers very well The files come in a format that we cannot change so I'm having to make some changes to the content.
Thanks
I'm listing files in a folder then iterating through them and reading the content before writing a new file.
MS SQL bulk insert not being able to handle text qualifiers very well The files come in a format that we cannot change so I'm having to make some changes to the content.
Thanks
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Within the FileServices Java code the memory for each file should be cleaned up as the file is read/written - you can't influence this. However the memory requirement might be twice the size of the file as each file is streamed and transferred to a string. You might need to be careful that your script is not accumulating these very large files in Javascript variables or form fields etc. Otherwise the only solution would be to increase the memory allocation.
0 x
Who is online
Users browsing this forum: No registered users and 123 guests