-
Notifications
You must be signed in to change notification settings - Fork 13
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
High Resource Usage- Probably memory leak on PHP 7.0 #17
Comments
Were you running on PHP 7 on Ubuntu 14.04 ? |
Nopes, it was PHP 5.x. But the issue is not there on another Q2A site running on same server. So, I again tried debugging and pinned the problem to this part: if (!empty( $image_url ) ) {
$image_data = @getimagesize( $image_url );
$imageOg = new OpenGraphProtocolImage();
$imageOg->setURL( $image_url );
$imageOg->setWidth( !empty( $image_data[0] ) ? $image_data[0] : 1200 );
$imageOg->setHeight( !empty( $image_data[0] ) ? $image_data[0] : 630 );
if ( !empty( $image_data['mime'] ) ) {
$imageOg->setType( $image_data['mime'] );
}
$ogp->addImage( $imageOg );
} The @getimagesize function call seem to cause the issue of memory leak but is not happening on another Q2A running on same server. All other plugins are the same too. :O |
Ok. I will take a look on this |
Thanks.. |
@amiyasahu : Can I use the plugin, if the issue is fixed? |
Hi, I was using this plugin and had no issue until I moved to PHP 7.0 on Ubuntu 16.04. Since then my site was crashing and finally it worked when I uninstalled social-share plugin. Not sure what the issue is as everything is normal on Ubuntu 14.04.
The text was updated successfully, but these errors were encountered: