Heap Space

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

Heap Space

#1

Postby Steve James » Wed Feb 08, 2017 11:17 am

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?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Wed Feb 08, 2017 2:20 pm

Are you using FileServices to do this?
0 x

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

#3

Postby Steve James » Wed Feb 08, 2017 2:25 pm

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
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#4

Postby Jon » Wed Feb 08, 2017 4:18 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

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

#5

Postby Steve James » Thu Feb 09, 2017 2:45 pm

Thanks Jon.
0 x


Who is online

Users browsing this forum: No registered users and 42 guests