RangeError: The value of "offset" is out of range. It must be >= 0 && <= 17825792. Received 17825794

Hi,

I’m trying to run a new service in production when I get this error message (from debugging in staging)

RangeError: The value of “offset” is out of range. It must be >= 0 && <= 17825792. Received 17825794

I have tried to limit the amount of data that the service reads, but no change to the error message.

Any suggestions?

Hi, Preben

To understand more of what is going on in the service, try debugging with the Developer tools for Services. Developer tools for Services | Appfarm Documentation

I cannot guarantee that this will give you the information you need, but it’s definitely worth a try.

A possible reason for this error could be a limitation in node/js or MongoDB, related to the object size. If you are working with file objects, try using the file object class.

Hi, It is a file object clas and I did use the developer tool for services, but it did not give any good answers.

I did a restructure and also found a small error in a select. This somehow solved the issue

Good to hear that the problem seems solved!

If you find the time to provide more information on the select, it would be interesting to understand what caused this error.