Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
2.1k views
in Q2A Core by
All features in Q2A is just for a small website , when your website grow and receive a huge traffic you have to remove the plugins one by one then disable the built in features like viewing count and event logger voting because its make the website loading slow and has downtimes with the big traffic

The website only will become for ask questions and answer it without any features .
by
My site has the same problem, but I think it's a plugin that causes errors.
My site has had more traffic that currently, with the same functions activated and plugins and these problems did not happen.
On my site, the problem is more serious, because even the server becomes inaccessible.
What is your site?
by
How much traffic do you get? How many visitors/page views? What kind of hosting do you have?
by
My website receive about 1 million and half PV/DAY my server is 64 GB  server

3 Answers

+1 vote
by

This is a problem with any script in any programming language and more so with PHP code. Traditional PHP is dynamically typed, meaning the basic nature of a variable used in code—that is, whether it’s a number or a text string or some other type of data—isn’t specified until the program’s actually running. Programmers enjoy that flexibility, but it creates room for errors that aren't possible in statically typed languages like Java or C, where the type of each variable is explicitly defined when code is written. 

So even if a plugin/feature is thoroughly tested under normal conditions the code may behave differently under heavy traffic.

I have tried many Open source scripts and found q2a the best among them, still under heavy load it cracks here and there. 

If anybody finds a solution... Please let the community know.

+2 votes
by
I only noticed the view counter is giving problem while updating hotness. The update query running little slow.

https://github.com/q2a/question2answer/issues/376

The voting and event-logger plugin runs quite smooth. I don't see any issues with these stuff.

And obviously if you are using some third party plugins then it may slow down the performance if it makes inefficient queries. You need to make sufficient testing to make sure you are using appropriate plugins for your setup.
by
Hi Ami!
Do you know if this situation happened in version 1.7? (view counter slow)
by
yes . This happens with the update query. But only if you have more number of concurrent users. In normal situations I did not see this is an issue.
by
edited by
I disabled the hit count and my site seems to have been faster!
For now it's morning in Brazil so there are few active users. But I hope that will solve the problem. Yesterday my site was 16 hours off.
Thanks, Ami!
+2 votes
by
edited by

Firstly, rest assured I'm investigating all performance issues being reported, like the one by Ami. As stated elsewhere I've already made a lot of improvements for 1.8, and will be adding caching on top of that shortly. Surprisingly, the biggest bottlenecks in my testing were not SQL queries. Two are described here, you could try implementing those.

Regarding plugins, there's not a whole lot that Q2A can do if they are slow. Adding more and more plugins is generally going to mean adding more and more code and often more SQL queries.

If you're able to diagnose any specific problems such as slow queries or inefficient code in plugins, do let me know and I'll see if I can suggest improvements.

Finally, 1.5 million page views a day is HUGE so you should have good hosting to match. This isn't limited to Q2A, if you had that many page views on Wordpress or Joomla (or any PHP app) without any caching, you'd also have problems. It sounds like you do have good hosting though.

BTW if you're not using PHP 5.6 it's worth upgrading to that, or even PHP 7 if possible.

by
Is q2a fully compatible with php 7 or should we wait for 1.8?
by
I think there is nothing in q2a which prevent us with using php 7. I never get a chance to test it throughly though, I hope this will work.
by
Scoot please don't forget to provide a option to store images and uploaded files in the server system and not in DB
Any date for the q2a  1.8 release ??
by
I've tested Q2A 1.7 on PHP 7 and it worked fine for me. Of course, you should test it yourself first in case there are any plugins that do not work, but it should be fine.

@Hypo there is already an option for that, see the QA_BLOBS_DIRECTORY option in qa-config.php
...