We are using a sql query which fetches 50K lines of results,
Is there any limits in running the JS? could you please help me out.
As Manoj and Jon mentioned you likely have an issue with the script or the data being returned itself. Generally speaking on the Adobe side we almost never need to increase the memory past 512mb. If we still hit failures that almost always indicates a problem.