Hi nh123,
THanks for your message.
No, I can’t say that i’ve come across this issue before. BNFW should work well with all hosts so I don’t think it’s anything specific with WP Engine.
Are you able to check the error logs and see if anything related to the blank page that you’re seeing? You can get to it by going to your Install in the WP Engine Dash and then going to Error Logs on the left.
Let me know if you find anything.
Thanks,
Jack
Thread Starter
nh123
(@nh123)
Hello Jack,
Below is the answer from WPengine after their testing.
—————-
Hello there,
Thank you for your patience on this.
I went ahead and copied this install over to a test install called: airjtest which I then disabled all plugins, aside from the notification plugin, and set theme to default. I was able to replicate the 500 error that you were receiving.
I ran an strace on the process id while attempting to load the Add New page. I was able to narrow down the issue to a specific query that is being performed on the user table within the database which is trying to pull in all users and then order them by email.
The query that is responsible for this 500 is the following:
$users = get_users( array(
‘order_by’ => ’email’,
This is located within the following file on lines 404 and 405: wp-content/plugins/bnfw/includes/admin/class-bnfw-notification.php.
The issue appears to be related to a memory issue due to the size of the users table. I came to this conclusion based on the fact that if I increase the memory to 2GB, the process will 502 instead of 500 which is a result of our apache kill-long-process script that is in place on the server to prevent server load. The function above is attempting to pull in all users in an array and also order them by email which is taking a ton of memory to complete. Likely, in order for this to work with your database, the plugin developer will need to alter this function so that it is scalable with larger databases.
If you can provide this information to the plugin developer that would be highly appreciated.
Looking forward to your reply.
Cheers!
——————
Do you think this can be solved so that we can use the plugin ?
Hi nh123,
Wow! Thanks for the fantastic reply and helpful information.
I’m going to investigate this further. Can you tell me how many users you have on your site?
Thanks,
Jack
Thread Starter
nh123
(@nh123)
User count is 96.000 and increasing
Hi nh123,
Gosh! I didn’t realise BNFW was being used on sites that big! That’s great!
I’m looking into this as a matter of priority. It’s something that’s been on my radar for a while but haven’t had to look into it too much yet.
I’ll let you know how I get on.
I’d be interested in talking to you more about how BNFW is working for you on a site of that scale if possible. Would you be able to drop me a line via the contact form on my website?
Thanks,
Jack
Hi nh123,
Received your email and i’ll get in touch with you directly.
The issue here was the volume of users that the Users / User Roles select box had to query for. I’m looking to improve this in a near future version of BNFW.
Thanks,
Jack