On Apr 15, 2020, at 2:20 PM, John J Foster via 4D_Tech <4d_tech@lists.4d.com> 
wrote:
> 
> 4D v17.2 64bit Windows
> Windows 10 Pro
> 
> We have some reports that are run in a batch overnight. Have to because they 
> take that long to run all of them. Anyway, since we’ve upgraded from Windows 
> 7 to Windows 10 there have been I’m guessing timeouts on some of these larger 
> reports.
> 
> The report is running along and then we get the error: "executing the method 
> “EXP_CumulativeClaims” at the lilne number 63. The .txt document cannot be 
> written. File not found.”
> [snip]
> 
> The text file report size - when it works - is large:
> 
> Reserve file: 831,801kb
> Claims file: 26,959kb
> [snip]
> 
> Would it be helpful and speedier to redesign the reports so they are not 
> sending out each row but maybe save each row to a text variable, say 100 or 
> 1000 rows and then send packet?
> 
> We are open to all ideas.

In the time it takes to troubleshoot this, you could probably rewrite the 
report to be much faster and more reliable. 

I would start by writing the file to a local temp file, and then copying that 
file to the network drive when finished. This reduces the impact of network 
issues both for completing the operation and the network share, and makes it 
much more likely you only get a completed version on the network share for 
external consumption.

The fastest way to build the output is probably with a pre-sized blob, and 
using TEXT TO BLOB with the offset parameter. Pushing elements into a 
collection and then using collection.join() is also pretty fast, but again 
you’d have to test to see how large a text variable can actually be, and 
whether the limit was large enough both interpreted and compiled. If you don’t 
have enough RAM for a 1GB blob, smaller blobs may work with SEND PACKET.

Jim Crate

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to