Multipart form file upload stalls in latest 3.6.0-SNAPSHOT
93 views
Skip to first unread message
Ronald van Raaphorst
unread,
Sep 15, 2018, 6:33:18 AM9/15/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vert.x
Hi,
We're uploading files to our vertx 3.6.0-SNAPSHOT based test server (latest build I guess), and all of a sudden uploading a file stalls at about 123 Kb.
At least, that's the size of the file being uploaded in the vertx upload directory.
For smaller files (< 125 KB) everything works fine. The file is uploaded to the upload directory, and then handed over to my file upload handler.
For larger files (ie > 135 KB) the upload stalls. The file is partially uploaded to the upload directory and my upload handler is never called.
We released a test/acceptence version earlier this week, and that seems to work fine (even with larger files). I'm a bit lost as where to look.
Could be my own code, but then the plumbing for getting a file to my upload handler is all vertx / body handler work.
My own upload handler also has not changed, and is never called anyway for lager files.
Is there anything with the body handler that I didn't get? Am I missing something?
I tried to go back to vertx 3.5.3 but we're using the io.vertx.ext.we.multipart.MultipartForm in a lot of tests so that would be some work to refactor or eliminate.
This is the request header / form data for the upload:
This is the webserver initialisation relevant part: Somehow I have the feeling that it has something to do with the bodyHandler, since the uploadHandler is never called for larger files.
For smaller files (< 125 KB), everything works just fine.
router =Router.router(vertx)?:throwException("Can not create router") val mainRouter =router!! httpServer =vertx.createHttpServer()?:throwException("Can not create httpserver") val server =httpServer!! val authProvider =AppAuthenticationProvider(vertx) val authHandler =AuthenticationHandler(vertx,authProvider);
// Our file upload handler val uploadHandler =UploadHandler( vertx,authProvider,mapOf("user"to USER_PROVIDE_FILE_UPLOAD_INFO,)
) val bodyHandler =BodyHandler.create().setUploadsDirectory(AppPath.upload) .setBodyLimit(-1)// unlimited upload? TODO: Reset to 10 * 1024 * 1204 (10M B) mainRouter.route(HttpMethod.POST,"/file") .handler(bodyHandler) .handler(uploadHandler)<-- IS NOT CALLED ANY MORE
Enter code here...
If anyone could shine a light, that would be greatly appreciated. I'll try to setup a small test and try to isolate the problem.
TIA
Ronald
Julien Viet
unread,
Sep 19, 2018, 12:14:17 PM9/19/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ve...@googlegroups.com
Hi
can you provide a reproducer project ? that would be very helpful