janus-ssp / janus

Fully featured metadata registration administration module built on top of simpleSAMLphp.
Other
13 stars 8 forks source link

Out of memory when fetching all entities via the API #563

Closed baszoetekouw closed 9 years ago

baszoetekouw commented 9 years ago

Yesterday, this worked just fine:

curl -v -u user:pass 'https://serviceregistry.surfconext.nl/janus/app.php/api/connections.json

to fetch all entities from Janus. Today, I get only a 500 http error :(

The error log is enlightening:

Jan 20 15:16:36 prd43 Apache-SR: [Tue Jan 20 15:16:36 2015] [error] [client 145.97.21.119] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /opt/openconext/OpenConext-serviceregistry-5.0.1/simplesamlphp-1.12.0/modules/janus/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php on line 88

I'm not sure what all 134MB of memory is used for, but all (~1000) entities should easily fit.

Note that fetching of individual entities, either by eid or by entityid, works fine. Therefore, this is not very urgent, I guess.

thijskh commented 9 years ago

Can you verify this against the "4th set"? Would be interesting to know if the changes in 1.20 contributed to solving or mitigating this memory hog problem.

baszoetekouw commented 9 years ago

Ah, seems to work ok on the fourth set! It's quite slow though, but that's to be expected, I guess.

thijskh commented 9 years ago

So it will likely be better after the deploy of janus 1.20.2 today, and even further addressed when 1.20.3 makes it to production.