Seven Stars

POST data size - Karaf - Jetty

Is there any place where I can tell the container to accept lots of data?

 

In one of my web service, data around 1-2MB is consumed easily. However, when I sent data around 8MB, it was unable to process the data.

 

I was searching and it looks like jetty is having a max limit on the post data. It can be changed by modifying the jetty-web.xml?? 

 

http://www.eclipse.org/jetty/documentation/current/setting-form-size.html

 

Any direction for setting the Karaf Jetty to accept a bigger amount of data?

 

Thank you. 

12 REPLIES
Seven Stars

Re: POST data size - Karaf - Jetty

Shameless BUMP.
Seven Stars

Re: POST data size - Karaf - Jetty

Any help please? I am out of options here. Does Karaf/ Jetty have any size limitations on the size of incoming FORM POST data? If yes how can I change it?

Thank you.
Six Stars

Re: POST data size - Karaf - Jetty

Which message do you get from the job? Because when I had a problem with bigger files it was down to the memory allocated to the job. Did a translation in the job which costed a lot of memory, the webservice components where able to handle much bigger files without issues. 

Seven Stars

Re: POST data size - Karaf - Jetty

It ends up being a 500 Error on the server side. Please advise what is a good way to troubleshoot it.
Six Stars

Re: POST data size - Karaf - Jetty

Hi,

 

What I did was adding a Tlogcather combined with a tXMLmap to generate a Document to send with the 500 error. In normal cases you don't need a body with a 500 but you can send (tRestResponse) it so I used the map to add information to help me with the debugging.error500.PNG

 

 

Seven Stars

Re: POST data size - Karaf - Jetty

So wont we have a problem where it will say "Response already sent?"
Six Stars

Re: POST data size - Karaf - Jetty

Not when you let the job die when an error is received.
Seven Stars

Re: POST data size - Karaf - Jetty

Hmm, I will see if I can add that to test. Nonethe less, is there any way to set the correct POST data size settings?
Six Stars

Re: POST data size - Karaf - Jetty

Not that I am aware of, besides it is generated automaticly. Error 500 is an internal error within the job/ services it self in most cases.
Seven Stars

Re: POST data size - Karaf - Jetty

If you check the Jetty engine (which is embedded in the Talend Runtime ) it has some setting: http://www.eclipse.org/jetty/documentation/current/setting-form-size.html
I have unable to override the same.
Six Stars

Re: POST data size - Karaf - Jetty

Hi,

For us there was no need so far to dive into these settings, we process reguraly SOAP message bodies up to 20 MB without setting tweaks. I asume your service works well within the studio? Maybe you can monitor your memory usage within the studio of the job and see if there is a spike? In that case allocating more memory withing the runtime to the service cloud solve the issue.
Seven Stars

Re: POST data size - Karaf - Jetty

I think I have figured out the problem... It seems to be our corporate firewall. Local connections work great. However, publicly accessible services seem to be blocked. Thanks