Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
538 views
in Q2A Core by
edited by

I am experiencing an inconsistent time out problem when opening options to a plugin, any plugins. Below is an example for when it worked.

There are times when that simple configuration won't load and exceeded the time out threshold in my PHP configuration (120 seconds). I also tried opening the options for other plugins and the same thing happened. However, as I mentioned above, the error is inconsistent. There are times when it would always time out, but there are times when the options load perfectly.

In cases of time out, I tried logging out and logging in again but that didn't do anything to solve the problem. I also tried restarting my Apache, but that also didn't solve the problem. Sometimes I just leave it for a few hours or come back the next day and the time out problem was gone just like that.

Any hints on the source of the problem?

EDIT 1

Below is the error message I got when it's not working. I forgot to upload it before. Sorry about that.

Number of plugins installed: 13
Number of plugins enabled: 5

Q2A version: 1.8.6
by
1. Can you show an example "for when it DOESN'T work"? :) Otherwise, it is hard to guess what error you're getting
2. How many plugins do you have installed?
by
+1
Added in "EDIT 1". :)

1 Answer

0 votes
by
selected by
 
Best answer

If in the admin menu you see the submenu "Hidden (X)" instead of "Hidden", you will have to redownload and reinstall Q2A. Use this link: https://github.com/q2a/question2answer/releases/latest

Once you do that, follow these steps:

 1. Edit file qa-include/ajax/version.php

 2. Add the following code in exactly this line

session_write_close();

 3. Test again and let me know if it worked or not

by
I think I misunderstood you. I thought the steps was for when I found the "Hidden (X)" submenu. I'll follow up on the steps and let you know the result ASAP.
by
Thanks. Also, please, tell me the content of line 163 in the file mentioned in the above error, then. Because that line is just a closing curly brace: https://github.com/q2a/question2answer/blob/947a970beb76168a3ab1f4cbd0af468a168121c6/qa-include/app/users.php#L163 . That cannot generate an error.

In fact, I wonder why you have something different in that line. Have you changed that file somehow?
by
Hi again. Sorry for the super-late reply.

In line 163 in the file mentioned above, I only see a closing curly bracket just like you. Maybe it has something to do with line 162 containing "session_start();" I'm not really sure about that, though.

Regarding your solution, I've modified qa-include/ajax/version.php according to your suggestion and it works, at least for now. So, the problem has something to do with sessions?
by
Yes, with NTFS filesystems not releasing the files properly. That error doesn't show up in Linux
...