I have an app that need to output some data that I post trough an api.
I noticed that when the data are small size coldbox can output the data correctly, but if the size length is bigger I got this error:
`
Railo 4.1.1.000 Error (java.lang.StackOverflowError)
Message java.lang.StackOverflowError
Cause java.lang.StackOverflowError
Java Stacktrace java.lang.StackOverflowError
at java.lang.StringBuilder.append(Unknown Source):-1
at railo.runtime.dump.DumpUtil.toDumpData(DumpUtil.java:186):186
at railo.runtime.type.util.StructUtil.toDumpTable(StructUtil.java:118):118
at railo.runtime.type.util.StructSupport.toDumpData(StructSupport.java:125):125
at railo.runtime.type.CastableStruct.toDumpData(CastableStruct.java:129):129
at railo.runtime.dump.DumpUtil.toDumpData(DumpUtil.java:199):199
at railo.runtime.type.util.StructUtil.toDumpTable(StructUtil.java:118):118
at railo.runtime.type.util.StructSupport.toDumpData(StructSupport.java:125):125
at railo.runtime.type.CastableStruct.toDumpData(CastableStruct.java:129):129
at railo.runtime.dump.DumpUtil.toDumpData(DumpUtil.java:199):199
at railo.runtime.type.util.StructUtil.toDumpTable(StructUtil.java:118):118
at railo.runtime.type.util.StructSupport.toDumpData(StructSupport.java:125):125
at railo.runtime.type.CastableStruct.toDumpData(CastableStruct.java:129):129
at railo.runtime.dump.DumpUtil.toDumpData(DumpUtil.java:199):199
at railo.runtime.type.util.StructUtil.toDumpTable(StructUtil.java:118):118
at railo.runtime.type.util.StructSupport.toDumpData(StructSupport.java:125):125
`
This error does not happen if I send small amount of data.
I send this data with POST and then output like this:
`
<cfif len(httpContent.content) gt 0>
`
I’m on railo 4. This error does not happen if I try the same script on a stand alone page, always on same server. So I tend to consider this is a coldbox issue.
No. I have disabled all debug information. I think that circular reference is generated by coldbox that try to output the line of the error, but it runs out of memory because the data I pass are too big.
If I set a custom error template, that page simply display my error page.
Making a small data request, the scripts give me no error.
So that tells me that coldbox cannot handle large amount of data in the http request body. I will post my data here, if you wanna make some test.
To make a test, I’ve used a fresh coldbox app. Created a simple handler
`
function index(event,rc,prc){
writeDump(var="#GetHTTPRequestData()#",label="");abort;
}
`
I’ve used postman chrome extension and copy/pasted the content of the file to create a request to that handler. If I remove 20000 rows, the script works. Without eliminate rows, the script gives that error.
So coldbox should have a limit on request max size. I suppose.
First, I don’t think ColdBox has any type of POST size limit. The only place I know that has something like this is in CF-Admin (or Railo) which limits it.
Nothing in you’re code or error shows that ColdBox might be the cause, but as you say; it works outside of CB.
Event if CB duplicated the http request body into the RC or PRC, I’m still not sure that would cause a StackOverflow issue.
Not to mention the n* calls to railo.runtime.dump.DumpUtil.toDumpData - I am still pretty sure there is a reporting / debugging tool running that is causing your error.
I'm sure i have no debugging tool enabled. As i said before, that dumping is caused by coldbox error stackoverflow. If I enable the custom error handler, that error disappear and coldbox output correvtly the custom error page without outputting any information. But this is not the problem. The problem is that page cannot parse large request data. Luis probably could help
With big file the pdf is not generated. I really don’t understand what’s the problem I’m sure that coldbox is injecting something in the views that break my pdf…