Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

REST interface ...is exceeding the 65535 bytes limit

Hello,
I have design an REST interface for an sql db. After the 22 URI for the rest interface, I receive the following error:
 The code of method tRESTRequest_1_LoopProcess(Map<String,Object>) is exceeding the 65535 bytes limit.
I think I need to split the rest interface, but I cant set second rest interface in job. I can create a second job with an rest interface over an other ports, but this solution is not so nice.
Have anybody an other solution?
Greets Benjamin

Labels (2)
13 Replies
Anonymous
Not applicable
Author

The first thing to try is to use childjobs (jobs run using the tRunJob component) in your REST service. It sounds like you have a lot of components in your service to handle the 22 URIs. You should be able to package each of the URI processing paths into child jobs. Doing this will massively reduce the amount of code in your service.
Anonymous
Not applicable
Author

for every uri I have 4 child jobs: tflowtoiterate,tpostgresqlinput,txmlmap and trestresponse
Anonymous
Not applicable
Author

Can some parts in your URIs be captured as templates ?
Example, instead of
/1/2/a
/1/3/a
etc
do
/1/{id}/a
and then have an 'id' variable in a schema.
Another option to try is to capture several segments with regular expressions:
/1/{id:.*}
in this case 'id' will capture either 2/a or 3/a
Sergey
Anonymous
Not applicable
Author

so I have to create 22 subjobs with these 4 child element? Or can I sumirize it?
Anonymous
Not applicable
Author

The problem is that the sql queries and the received data (tablename) are very different vor every uri.
Anonymous
Not applicable
Author

Perhaps you might want to try query parameters
Anonymous
Not applicable
Author

Hang on, are you trying to run this from the Studio? It sounds like you are trying to run the service from the Studio and that maybe why you are feeling limited. You can create a service for each URI (in my opinion that would be better) and have them all running with the same port in Apache Karaf (the Runtime). When running in the Studio you really are limited.
Anonymous
Not applicable
Author

yes I trying to run this from the studio. So I can create more then one REST interface and run this in karaf under one kaf file (job)?
Anonymous
Not applicable
Author

I would recommend putting a local version of Karaf on your development machine and creating a kar file for every service you want to provide. This way you can have them all running in karaf together and test other components with them using the Studio. There is also the issue of Talend Studio not being a perfect copy of the Karaf environment. You will find that some things that work on Studio will not work the same in Karaf (and vice versa). The development lifecycle of a Talend service/route should be to build it on the Studio and then move it to test in the Karaf. Then keep your successful routes and services in your local Karaf so that you can test new routes and services being built in Studio with the ones running in Karaf. It's a bit fiddly, but makes life a lot easier in the long run.