Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP] Error: getimagesizefromstring(): Error reading from ! at /var/www/html/nextcloud/apps/photos/lib/Listener/SizeMetadataProvider.php#56 from ? #2259

Open
bernd-wechner opened this issue Jan 18, 2024 · 6 comments
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@bernd-wechner
Copy link

bernd-wechner commented Jan 18, 2024

Describe the bug
My log file is filled with this message:

[PHP] Error: getimagesizefromstring(): Error reading from ! at /var/www/html/nextcloud/apps/photos/lib/Listener/SizeMetadataProvider.php#56
from ?

Screenshots
Just a small section of the Logging viewer:
image

Nextcloud (please complete the following information):

Desktop (please complete the following information):

  • OS: Kernel: 5.15.0-91-generic x86_64 bits: 64 Console: pty pts/3, Distro: Ubuntu 22.04.3 LTS (Jammy Jellyfish)
  • Browser: Firefox
  • Version 121

Additional context
A complete formatted message is:

[PHP] Error: getimagesizefromstring(): Error reading from ! at /var/www/html/nextcloud/apps/photos/lib/Listener/SizeMetadataProvider.php#56
	from ? by -- at 18 Jan 2024, 10:23:00 pm

and a complete raw message is:

{
  "reqId": "M10zk8LUgTEAALmH7HB5",
  "level": 3,
  "time": "2024-01-18T22:23:00+11:00",
  "remoteAddr": "",
  "user": "--",
  "app": "PHP",
  "method": "",
  "url": "--",
  "message": "getimagesizefromstring(): Error reading from ! at /var/www/html/nextcloud/apps/photos/lib/Listener/SizeMetadataProvider.php#56",
  "userAgent": "--",
  "version": "28.0.1.1",
  "data": {
    "app": "PHP"
  },
  "id": "65a997949bbeb"
}
@bernd-wechner bernd-wechner added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Jan 18, 2024
@MihailCosmin
Copy link

Have same issue,
[Nextcloud Hub 7] (28.0.1)

image

@RobTheBuilder2
Copy link

I had the same issue and also had a lot of picture missing from the "All Media" view. Funny thing was the missing photos were showing up in the "Folder View". I fixed this by increasing the PHP allowed memory in the nextcloud configuration. After that, I ran a scan of the photos and everything was back to normal as well as no more error messages. I think the latest update uses more memory when scanning photos for exif data for some reason. Its the only thing I can think of. Similar to this post

@RobTheBuilder2
Copy link

I take it all back. After bumping my PHP memory limit, the problem went away for a few days. However, starting yesterday, I started to get the error again and now the 12G of PHP memory has been exceeded. Looks like a memory leak. Question is if this memory leak is a result of the exception handling or if hitting the memory limit is the actual cause of the errors. Either way, log file is flooded with the getimagesizefromstring() error again. Also, after getting into this state, the "All media" view no longer loads any photos. After I bounce my docker containers, "All Media" view starts to work properly again. Finally worth mentioning, while the PHP memory limit is set to 12G and there is an error message in NC log saying the limit was exceeded, my metrics show that there was never more than 800M claimed by the actual NC docker container. There is plenty of ram remaining on the server (32G) and for some reason, I get this memory limit exceeded error in PHP while it is only consuming 800M of the allowed 12G.

@benoitdr
Copy link

Seeing this too with 28.0.4

@GomoDD
Copy link

GomoDD commented May 27, 2024

This issue is still not fixed, it also occurs in 28.0.6

@joshtrichards
Copy link
Member

Apply the patch in #2524 (instructions though it's easy to do manually as well since it's a short PR). Then you can set your loglevel temporarily to 0 (debug level) to see the file path. This may give a hint about what is going on (maybe a file that can't be read for some reason?).

While similar to #2257 and #2235, those are more obvious as to their underlying cause (images corrupt... at least from gd's perspective).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants