Hello,

I'm using VIEWS_JSON in order to list more than 2000 ecommerce products it is exhausting the 90 sec limits but I increased it to 360 sec however it also uses more than 512 memory_limit and I'm not allowed on server to increase it to more than 512 memory limit is there any way to make it display the json file faster? and perhaps prebuilt some static version of it and just load new items ? instead of building the feed everytime someone accesses the link ?

Also my link ends with "domain.com/products-json" is there something I could do to make it display the JSON in a way it actually works ?

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4356259 bytes) in /home/XXX/domains/domain.com/public_html/sites/all/modules/views_datasource/views_json.module on line 420

Please advice :(

Comments

Narhir created an issue. See original summary.

anthonylindsay’s picture

Trying to display 2000 nodes in one view is just not going to work.

If you really need to do it, you should look at views_data_export. It has a batch function that uses the batch API to build the output in chunks and then write a file for download.

If you really need to use views_datasource then can you reduce the amount of data you are trying to include?

E.g., you could provide a JSON feed with just NIDs and titles, or something like that. Then you could build a second view to provide the detail for a single node based upon a supplied node ID.

anthonylindsay’s picture

Status: Active » Closed (works as designed)

Marking this as 'works as designed' because Views Datasource is not designed for large datasets, unlike Views Data Export.