partkeepr / PartKeepr

Open Source Inventory Management
http://www.partkeepr.org
GNU General Public License v3.0
1.38k stars 400 forks source link

Unable to load the projects list #919

Closed RiccardoRics closed 6 years ago

RiccardoRics commented 6 years ago

#Comment Hi there, here i'm again. I'm trying to open the "Edit project" tab, i get the page loaded but then, on projects list loading, i get a "Critical error" message.

#System Information

Critical Error

Details

The server returned a response which we were not able to interpret.

Request

GET https://xxx.hosting.partkeepr.com/api/projects?_dc=1509083177670

Response Status Code

500

Response

Server Configuration

doctrine_orm_version: 2.5.4 doctrine_dbal_version: 2.5.2 doctrine_common_version: 2.6.0-DEV php_version: 5.6.30-0+deb8u1 auto_start_session: true maxUploadSize: 10485760 isOctoPartAvailable: true availableImageFormats: JPG,GIF,PNG max_users: unlimited authentication_provider: PartKeepr.Auth.HTTPBasicAuthenticationProvider tip_of_the_day_uri: https://partkeepr.org/tips/%s password_change: true patreonStatus: [object Object]

#JS console warnings unreachable code after return statement[Ulteriori informazioni] extjs.js:22:366125 unreachable code after return statement[Ulteriori informazioni] main2.js:5582:12 unreachable code after return statement[Ulteriori informazioni] main2.js:31089:91 unreachable code after return statement[Ulteriori informazioni] main2.js:31349:91 unreachable code after return statement[Ulteriori informazioni] main2.js:5582:12

# How to reproduce 1) Access Partkeepr. 2) Click on Edit -> Projects 3) Wait for the projects list to be loaded and then see the "Critical error" alert.

Drachenkaetzchen commented 6 years ago

Do I have permission to have a look in your database?

RiccardoRics commented 6 years ago

Yes, of course you can.

Drachenkaetzchen commented 6 years ago

I was finally able to track this down - in short, a combination of an odd configuration error on the hosting servers and a too low timeout. I was able to speed things up, I hope this works until I can re-factor project loading to be faster.

Can you try in about 2 hours if it works for you?

RiccardoRics commented 6 years ago

Still bad reply...

Critical Error

Details

The server returned a response which we were not able to interpret.

Request

GET https://xxx.hosting.partkeepr.com/api/reports?_dc=1509813348070

Response Status Code

0

Response

undefined

Server Configuration

doctrine_orm_version: 2.5.4 doctrine_dbal_version: 2.5.2 doctrine_common_version: 2.6.0-DEV php_version: 7.0.19-1 auto_start_session: true maxUploadSize: 10485760 isOctoPartAvailable: true availableImageFormats: JPG,GIF,PNG max_users: unlimited authentication_provider: PartKeepr.Auth.HTTPBasicAuthenticationProvider tip_of_the_day_uri: https://partkeepr.org/tips/%s password_change: true patreonStatus: [object Object] defaultGridPresets: []

Drachenkaetzchen commented 6 years ago

In two hours, not now ;)

RiccardoRics commented 6 years ago

Sorry, got the opposite like you had to get test feedback before 19:30! Was focused in SMD solderings :)

Drachenkaetzchen commented 6 years ago

I just double checked, loading is still slow but it works on my side. Can you see if it works for you now?

RiccardoRics commented 6 years ago

Project list seems to work now. But then, trying to use the "Project Reports" tool, i got again the critical error message after i set "Qty" 1 to a project and clicked on "Create report".

Here it is (please tell me if I need to open a new issue):

Critical Error

Details

The server returned a response which we were not able to interpret.

Request

GET https://xxx.hosting.partkeepr.com/api/grid_presets?_dc=1509911192364

Response Status Code

0

Response

undefined

Server Configuration

doctrine_orm_version: 2.5.4 doctrine_dbal_version: 2.5.2 doctrine_common_version: 2.6.0-DEV php_version: 7.0.19-1 auto_start_session: true maxUploadSize: 10485760 isOctoPartAvailable: true availableImageFormats: JPG,GIF,PNG max_users: unlimited authentication_provider: PartKeepr.Auth.HTTPBasicAuthenticationProvider tip_of_the_day_uri: https://partkeepr.org/tips/%s password_change: true patreonStatus: [object Object] defaultGridPresets: []

EDIT Although i got that critical error message, i got also the report working with all parts listed. That's odd.

Drachenkaetzchen commented 6 years ago

Does it take very long as well, or does it give you the error very short?

RiccardoRics commented 6 years ago

Got quite imemdiate the error message, but then i got the parts list too. Now i tried again on top of the previous asking for another project report: it was slow but at the end i got the parts list without any critical error message.

Drachenkaetzchen commented 6 years ago

I will double check this tomorrow. I wasn't satisfied with the project report performance as well, so there might be something still wrong on the hosting systems

RiccardoRics commented 6 years ago

Okies, thanks. Let's keep us updated. I'll try again some features, if something different or new will happen, I'll report of course.

Drachenkaetzchen commented 6 years ago

Thank you as well for bringing this to my attention :)

Drachenkaetzchen commented 6 years ago

I just realized that the production hosting servers had xdebug turned on, which resulted in very slow responses. I disabled xdebug and the parts list loads now 3 times faster than before, so probably the project reports should now be faster as well. Can you double-check if it works now? (hopefully)

Drachenkaetzchen commented 6 years ago

Btw don't worry about the message "cron jobs are not running" - that should go away later today

RiccardoRics commented 6 years ago

I've tested it and that's what i got:

My download connetion is 20Mbps with 14ms ping.

BTW no more critical error messages. And yep, got about that cron message. ;)

Drachenkaetzchen commented 6 years ago

Yes, the numbers you gave are very similar to what I could measure here. Unfortunately further improvements are only possible once I can migrate PartKeepr to use a later version of the Symfony2 framework, but that will possibly take a while :(

RiccardoRics commented 6 years ago

Well, that would be a welcomed improvement, but not necessarely urgent ;)

RiccardoRics commented 6 years ago

Hi Felicia, got again the same error with memory report:

An error occurred

Details

Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)

Request

GET https://xxxx.hosting.partkeepr.com/api/projects?_dc=1521198525876

Response Status Code

500

Response

{"@context":"\/api\/contexts\/Error","@type":"Error","hydra:title":"An error occurred","hydra:description":"Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes)"}

Server Configuration

doctrine_orm_version: 2.5.4 doctrine_dbal_version: 2.5.2 doctrine_common_version: 2.6.0-DEV php_version: 7.0.27-0+deb9u1 auto_start_session: true maxUploadSize: 10485760 isOctoPartAvailable: true availableImageFormats: JPG,GIF,PNG max_users: unlimited authentication_provider: PartKeepr.Auth.HTTPBasicAuthenticationProvider tip_of_the_day_uri: https://partkeepr.org/tips/%s password_change: true patreonStatus: [object Object] defaultGridPresets: []

Drachenkaetzchen commented 6 years ago

for some reason the memory_limit had reverted to 128MB (probably an upgrade of the server), I have increased it again, it should work now

RiccardoRics commented 6 years ago

Thanks, and yes, now it's back to work flawlessly.