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

A strange problem arises when high concurrency generates QR Code #44

Open
wangyouw opened this issue Jul 12, 2017 · 0 comments
Open

A strange problem arises when high concurrency generates QR Code #44

wangyouw opened this issue Jul 12, 2017 · 0 comments

Comments

@wangyouw
Copy link

wangyouw commented Jul 12, 2017

this is my problem detail ,can somebody help?
In the PHP error_log,Intermittent occurrence of warning,like this :
1.imagecreatefromstring(): gd-png: fatal libpng error: [00][00][00][00]: invalid chunk type
2.imagecreatefromstring(): gd-png: fatal libpng error: Read Error: truncated data
3.imagecreatefromstring(): gd-png: fatal libpng error: PLTE: CRC error
4.imagecreatefromstring(): gd warning: one parameter to a memory allocation multiplication is negative or zero
5.imagecreatefromstring(): gd-png: fatal libpng error: IHDR: CRC error

1.Server environment(centos7.2+php7.1 + nginx+gd2.1.0+libpng1.5.13+zlib1.2.7)
2.QPS is somewhere around 100 to 500
3.code like this:
QRcode::png($url, $file_path, $errorCorrectionLevel, $matrixPointSize, $margin);
$QR = imagecreatefromstring(file_get_contents($file_path));

I wonder if the file_put_content need a lock in phpqrcode project ?
This problem has been bothering me for a few days,Jesus,I'm crazy..... help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant