Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Unable to save Flow Designer due to REST Payload exceed error

Bird1
Mega Sage

Hello,

 

I have a Flow Designer which need to contain about 120 If conditions. I am afraid that it will contains 300+ actions in Flow Designer, so I tried to chop each If conditions to subflow (for example: 1 subflow will contain about 5-10 if conditions). I did it but once I tried to save the Flow Designer (already added multiple of subflows to Flow Designer), it's failed to save with this below error log. I am not sure how to resolve it?

 

Rejected large REST payload with content-length = 30431828 bytes. Max allowed: 10485760 bytes.
com.glide.rest.serializer.impl.RequestDeserializerImpl.validateContentLength(RequestDeserializerImpl.java:123)
com.glide.rest.serializer.impl.RequestDeserializerImpl.getRequestDataIfWithinContentLengthLimit(RequestDeserializerImpl.java:99)
com.glide.rest.serializer.impl.RequestDeserializerImpl.getRequestDataAsString(RequestDeserializerImpl.java:89)
com.glide.rest.domain.ServiceRequestImpl.getRequestBodyAsString(ServiceRequestImpl.java:110)
com.glide.flow_design.rest.FlowService.updateFlow(FlowService.java:528)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.glide.rest.handler.impl.ServiceHandlerImpl.invokeService(ServiceHandlerImpl.java:44)
com.glide.rest.processors.RESTAPIProcessor.process(RESTAPIProcessor.java:349)
com.glide.processors.AProcessor.runProcessor(AProcessor.java:612)
com.glide.processors.AProcessor.processTransaction(AProcessor.java:274)
com.glide.processors.ProcessorRegistry.process0(ProcessorRegistry.java:184)
com.glide.processors.ProcessorRegistry.process(ProcessorRegistry.java:172)
com.glide.ui.GlideServletTransaction.process(GlideServletTransaction.java:46)
com.glide.sys.Transaction.run(Transaction.java:2468)
com.glide.ui.HTTPTransaction.run(HTTPTransaction.java:27)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)

1 ACCEPTED SOLUTION

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Bird,

There is a maximum length set on REST.

The title of the Now Support page is different but the cause and the resolution should be the same. Create property "glide.rest.max_content_length" and increase the maximum size of REST data.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0747638

View solution in original post

4 REPLIES 4

Aman Kumar S
Kilo Patron

Hey,

Do you have any REST step in this flow designer, in that case:

glide.rest.scripted.max_inbound_content_length_mb 10 The maximum size, in megabytes, for a scripted REST request body that is not gzipped.
glide.rest.scripted.max_inbound_gzip_content_length_mb 1 The maximum size, in megabytes, for a scripted REST request body that is gzipped.
glide.rest.max_content_length 10

The maximum size, in megabytes, for a scripted REST request body, whether or not it is gzipped.

Maximum: 25

As a result, even if glide.rest.scripted.max_inbound_content_length_mb or glide.rest.scripted.max_inbound_gzip_content_length_mb are set, the request body is limited to the value of glide.rest.max_content_length.

 

Update the highlighted one

Best Regards
Aman Kumar

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Bird,

There is a maximum length set on REST.

The title of the Now Support page is different but the cause and the resolution should be the same. Create property "glide.rest.max_content_length" and increase the maximum size of REST data.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0747638

Will it impact to system's performance (slow or etc.) once we increase it?