October 04, 2017 08:01AM
nginx/1.12.1

Creating new files with PHP (image resizing) works fine, the new files are served well. Then suddenly after a couple of days the file is returned as a sequence of NULL bytes Content-Length long.

HTTP/1.1 200 OK
Server: nginx/1.12.1
Date: Wed, 04 Oct 2017 11:33:57 GMT
Content-Type: image/jpeg
Content-Length: 8915
Last-Modified: Sun, 01 Oct 2017 19:30:46 GMT
Connection: keep-alive
ETag: "59d14266-22d3"
Expires: Thu, 31 Dec 2037 23:55:55 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes

00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000020: 0000 0000 0000 0000 0000 0000 0000 0000 ................
** snip **
000022c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000022d0: 0000 00

Looking at the file via SSH under the nginx user the file is fine:

sudo -u nginx cat path/to/file.jpg | xxd

00000000: ffd8 ffe0 0010 4a46 4946 0001 0100 0001 ......JFIF......
00000010: 0001 0000 fffe 003b 4352 4541 544f 523a .......;CREATOR:
00000020: 2067 642d 6a70 6567 2076 312e 3020 2875 gd-jpeg v1.0 (u
00000030: 7369 6e67 2049 4a47 204a 5045 4720 7636 sing IJG JPEG v6
00000040: 3229 2c20 7175 616c 6974 7920 3d20 3832 2), quality = 82
00000050: 0aff db00 4300 0604 0405 0404 0605 0505 ....C...........

Any ideas what may be going wrong?
Subject Author Posted

nginx null bytes on static image

soulseekah October 04, 2017 08:01AM

Re: nginx null bytes on static image

Maxim Dounin October 04, 2017 10:48AM

Re: nginx null bytes on static image

soulseekah October 05, 2017 08:57AM

Re: nginx null bytes on static image

Maxim Dounin October 05, 2017 09:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 239
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready