Maximum length of GPString parameter for a Published Geoprocessing Service.

489
4
02-26-2024 12:22 AM
Cristian_Galindo
Occasional Contributor III

There is a Geoprocessing tool that has been published in an ArcGIS server instance. this tool has several parameters defined as GPString.

One of the parameters is intended to receive a collection of objects in WKT format.

Doing some initial test the Geoprocessing service works with any issue. 

When the tool is exposed to real examples, it start receiving long strings, it means really loooong strings.

For this case it is send an string with 9.220.000 characters approx. and the service answer is:

Cristian_Galindo_0-1708935229486.png

When the log of the server is check, it indeed create the job and try to process it, but the Python code of the tool never receives the parameter (As can be seen in the 4th message - it should prints the parameter):

Cristian_Galindo_1-1708935409848.png

I have trying to figure it, through the documentation, about the limit of the GP parameters, but so far, i have not found it. 

I found two possible solutions, it is to use the upload task of the GPService and pass the upload item id as a parameter, the other one is to use the SOAP endpoint (but SOAP endpoint are going to be deprecated.....so...better not to implement it)

Does any one know this limitation? probably someone from inside ESRI? ( @SimonSuo @SimonSuo1 )

 

0 Kudos
4 Replies
AlexanderDanielPratama
Esri Contributor

May I clarify first the size of your string in MB? If one string is equal to one byte, so 9 million string is 9 MB cmiiw. 

In my experience, there is no limitation of string or file, probably the causing of the limits are the Windows IIS  or Linux Webserver. You may increase the limit size first. Increasing the Maximum Upload File Size in IIS - KB306 - Inflectra

However, I never use so many strings in gptool in the parameter. I agree that you better use your first alternative solution.

Hope it helps you

Cheers

0 Kudos
Cristian_Galindo
Occasional Contributor III

Hello Alexander, as you state, and under my knowledge this string is about 9 Mb.

taking into account your proposed solution I can state that I have a WebAdaptor configured in IIS 10, it allows by default 30Mb as maxAllowedContentLenght, that should enough for this use case. As I an using a POST call, the size of the limit on the query string should not affect.

do you have any other suggestion?

 

Thanks

0 Kudos
AlexanderDanielPratama
Esri Contributor

I tried creating a dummy script for the toolbox that prints more than 9 million input strings in ArcGIS Pro. Unfortunately, it crashed 😅.  (My office laptop is 32 GB, I7- gen 13, NVME, RTX 4050) I try to simulate what the ArcGIS Server does if I use the ArcGIS Pro. I think the problem is not in the limitation or platform. Is it possible that your string is saved in a file first? i.e input_data.txt. Then republish the GP service by changing the input format parameter to a file

0 Kudos
Cristian_Galindo
Occasional Contributor III

Hi Alexander, 

my use case is to receive one (1) string with 9.220.000 characters as a GPString.  

Cheers

0 Kudos