The plugin is not too memory intensive, especially for simple links, are you running any other plugins? It could be some sort of compatibility issue with another plugin?
If you uninstall the ip2nation database and turn off link localisation, does that work? I doubt this is a problem in itself, its only a single simple DB query, but it might have tipped it over the edge.
Memory bugs like this are usually caused by it getting stuck in a recursive or infinite loop. One area that might be a problem is the template expansion, it will loop until all keywords are expanded. It would be quiet difficult to get this to happen though!
Obviously doing the example shortcodes works fine on my installation.
The simplest is something like [amazon asin=0123456789&text=test link], the plugin does hardly anything to do this so it must be clashing with something else.
You could try disabling plugins one at a time until you no longer get the error?
Difficult to diagnose!
Paul
Thread Starter
kshade
(@kshade)
Disabling these does not solve the issue, sadly. We are running a bunch of plug-ins, including WangGuard, Quick Cache, s2member, buddypress and bbpress.
Installing the database takes a long time and ultimately times out (white settings page). Going to the templates menu also takes a lot longer than it should. I can’t see any more specific errors about these things though.
Hmm,
You have me stumped!
So the backend pages mostly work (apart from the ip2nation install), but not the front end – its a clue but not a big one!
The templates page can take a long time as it has to look up the details about the products in each template from Amazon. Turning on the cache should improve the Template page load times (or turn all the previews off).
Just to check, enabling the plugin but _not_ putting an ASIN in the page will display fine, but as soon as one simple shortcode is added it fails?
Cheers,
Paul
Thread Starter
kshade
(@kshade)
I’ve enabled slowlog in php-fpm (because it is slow… before it runs out of memory, also I couldn’t get xdebug to work). Maybe this helps:
[07-Nov-2013 00:26:00] [pool www] pid 11168
script_filename = /srv/www/wordpress/index.php
[0x0000033ce6a33448] mysql_query() /srv/www/wordpress/wp-includes/wp-db.php:1205
[0x0000033ce6a332d8] query() /srv/www/wordpress/wp-includes/wp-db.php:1530
[0x0000033ce6a330a0] get_results() /srv/www/wordpress/wp-includes/meta.php:563
[0x0000033ce6a32f08] update_meta_cache() /srv/www/wordpress/wp-includes/meta.php:287
[0x0000033ce6a32dd0] get_metadata() /srv/www/wordpress/wp-includes/user.php:859
[0x0000033ce6a32cd0] get_user_meta() /srv/www/wordpress/wp-includes/capabilities.php:719
[0x0000033ce6a32bb0] _init_caps() /srv/www/wordpress/wp-includes/capabilities.php:984
[0x0000033ce6a32aa0] for_blog() /srv/www/wordpress/wp-includes/capabilities.php:521
[0x0000033ce6a32948] init() /srv/www/wordpress/wp-includes/capabilities.php:493
[0x0000033ce6a32798] __construct() /srv/www/wordpress/wp-includes/user.php:587
[0x0000033ce6a32660] query() /srv/www/wordpress/wp-includes/user.php:385
[0x0000033ce6a32550] __construct() /srv/www/wordpress/wp-includes/user.php:689
[0x0000033ce6a323b8] get_users() /srv/www/wordpress/wp-content/plugins/amazon-link/amazon.php:896
[0x0000033ce6a321f0] get_channels() /srv/www/wordpress/wp-content/plugins/amazon-link/amazon.php:983
[0x0000033ce6a320b0] get_channel() /srv/www/wordpress/wp-content/plugins/amazon-link/amazon.php:1235
[0x0000033ce6a31e90] get_local_info() /srv/www/wordpress/wp-content/plugins/amazon-link/amazon.php:1791
[0x0000033ce6a31cd8] make_links() /srv/www/wordpress/wp-content/plugins/amazon-link/amazon.php:1310
[0x000003e9c88379c0] shortcode_expand() unknown:0
[0x0000033ce6a31b28] preg_replace_callback() /srv/www/wordpress/wp-content/plugins/amazon-link/amazon.php:1270
[0x000003e9c8838050] content_filter() unknown:0
Thanks, I’ll dig a bit deeper,
Do you have a large number of users?
Paul
If you don’t need users to have affiliate ID’s, try disabling the ‘User Affiliate IDs’ option on the settings page.
Paul
Thread Starter
kshade
(@kshade)
Yes, we’ve got a lot of users, and disabling that seems to have done the trick. Thanks for the help!