Getting 500 Server Error when start is 25000

When using the Confluence api I can retrieve my pages by limiting to 200 for each request. I run this through on a loop. All is fine until I hit 25,000 for the start parameter. I can find no documentation on limits to this parameter. I have about 38,000 pages in my space.

request - content?spaceKey=EDD&limit=200&start=25000

I would recommend to contact Atlassian support https://support.atlassian.com/contact/#/ and provide the specific REST API that failed and a timestamp when it happened and ask them to check the log file to find what caused the 500 Server Error.

Probably this is caused by corrupted page data in the database and there is some unhandled exception.