HTTP 500 server internal error

Hi, I'm customizing a dashlet, but when I try to receive data from SugarCRM on demand using filter API. But, when setting max num filter to -1 (no data limit), I get 500 (Internal Server Error).

I'm trying to bring over 8600 records. If I put 8000 instead of -1 right there, I can bring the records and recieve 200. But, I can't have this kind of limit on my request because my aplication needs this records.

What should I do?

  • Why are you using a dashlet if you need that amount of data? What is the purpose of having all these records in the frontend? Is it to draw some sort of graph? Show a report like thing? The best approach would be to have a recursive javascript function that retrieves the data using the offset property of the api.

    First take 1000, take 1000 again until you get nothing new and then stop. For the 500 error. I think you ran into a bug there but of course if you are on cloud support can help you out with that. If you really really need that amount of data in the frontend you could ofcourse always overwrite the default behaviour of the api but I wouldn't do that just to be sure you don't kill the server when 10 people are opening the dashlet.

  • I had exactly the same problem when I was using a C# script to sync data from Sugar to ServiceNow. A 500 error would be thrown when the number of records that I tried to bring over was too high. According to Sugar Support, this was caused by a PHP out of memory error. In an on-premise installation, this problem can be fixed by increasing the memory limit in php.ini. But Sugar does not do that in cloud instances. We solved this by by syncing the data more frequently, which decreased the amount of data that had to be brought over during each sync cycle.

  • Hi Jeroen,

    Thanks for replying.

    My client wants a dashbord with a dashlet that shows all his data in the current year in a graph with the same type of pareto chart, but with some customs in data.

    I've been fetching data like you said me, and it seems me to work fine.

    Thank you!

  • Hello Yury,

    Yes, sugar does not do that in cloud instances. I'm getting data by steps and pushing it in an array. It seems to work...

    Thanks for replying!

  • Hello Vinicius,

    To accomplish this functionality I suggest creating a new API endpoint that performs the summation queries on the Sugar end then returns the needed data to populate the graph. This should be much more performant than requesting all records and doing the summation on the receiving end.