Cffile action upload in 6.0.1.83

cfile action upload does not accept files larger than 2mb in Lucee 6.0.1.83 when cffile is invoked by javascript.
502 error bad gateway is returned by the server.
Downgrading to 6.0.585 started working again.

OS Linux (4.9.0-19-amd64) 64 bit
Servlet Container: Apache Tomcat/8.5.31

This is a tomcat issue not a lucee issue.

in your server.xml
set

maxPostSize=“20971520” // 20 meg, vs default 2 meg

you could also set in web.xml, under the lucee servlet

   <max-file-size>52428800</max-file-size> <!-- 50 MB -->
    <!-- Maximum request size allowed for upload -->
    <max-request-size>209715200</max-request-size> <!-- 200 MB -->

See:
https://tomcat.apache.org/tomcat-9.0-doc/config/http.html

2 Likes

I think you need to update tomcat config:

max-file-size

https://tecadmin.net/increase-tomcat-upload-file-size-limit/

Changing maxPostSize in server.xml does not work, I’ve tested it before, same 502 error with files over 2Mb. Lucee 6.0.585 does not have this issue.

Have you tried comparing the two server.xml files?

Connector on 8888 are the same, maxPostSize is not present in 6.0.585 and not present in Lucee 6.0.1.83

did you restart your server?
did you editted the correct file?

I had to make tweaks to IIS to get mine working. Are you using IIS?`

Here’s my post regarding this

1 Like

Yes, I restarted and edited the correct file.
As I said I receive this error only when cffile upload is invoked from jquery to a .cfc file, from .cfm file this not happen.
Only in Lucee 6.0.1.83, downgrading to 6.0.585 started working again.

ahh, I’ve not used Jquery for some time, that I can’t help with (Well not extensively and not to anything too complex)

It sounds like jQuery is not the primary issue since it works in Lucee 6.0.585.

I would focus on the difference of .cfc vs .cfm, though it sounds like a new bug or regression in 6.0.1.83 that requires a response from Lucee team.

1 Like

Just reigniting this.

I am now encountering an issue when updating to 6.0.4.10 and rolling back to 6.0.585 fixes the issue.

We are uploading files through a jquery uploader that posts files to an API endpoint. The request just hangs and doesn’t respond with any error or output. It simply times-out after 1 minute. I’ve set this to an hour and we have the same outcome.

I have set the API endpoint to respond with simply Now() and it doesn’t return this, it simply times-out.

I can see the file is being placed to the temp directory, so I doubt there are any filesize restrictions playing up here - it does seem slow to load in there though, even on local.

It just seems like the file is uploading to temp and then the api function isn’t being executed.

Any advice would be greatly welcomed, as mentioned - this works fine on 6.0.585 but any version after this does not.

Edit: I can see its been raised in another thread and links to a ticket but I can’t access this one for one reason or other

https://luceeserver.atlassian.net/browse/LDEV-4898

it’s visible now, let me know if it’s still a problem with 6.2

1 Like

Ah fantastic, thanks Zac.

We’ve rolled back to 6.0.585 for the time being as I briefly upgraded to 6.2, however it errors where our application includes external .jar files - so some more investigation is needed our side before flagging anything up.

Thanks again for that!

Was it involving jars in the context/lib directory?

https://luceeserver.atlassian.net/browse/LDEV-5376

Indeed it was - will give that a try and report back

Upload works in 6.2 - result.

However, 40 seconds to upload a 20mb file seems pretty slow for local - will look at optimising, thanks again, Zac

indeed, can you describe your stack?

nice thing about something taking so long, you have enough time to grab a thread stack trace

my performance analyzer admin plugin has a threads tab, that will tell us what is going on java wise during those 20s, or you can use jcmd

1 Like