Jump to content
TNG Community
TNG_Mike

Max Questions error takes down site

Recommended Posts

TNG_Mike

I just created and imported a new tree. Soon after, I got an "exceeded max_questions" error. I believe I have to wait an hour for my sql server to further queries. But now when I go to my tng site, the error message displays. I tried refreshing and two different browsers, with same problem, so it's not a cache issue. So if anyone tries to access my tree for the next hour, they'll get an incomprehensible (to them) error page instead of my TNG site. Is there some way to avoid this? A custom error page I can display? I know there is a feature to disable site access during updates. (Or something like that. I can't access my site right now to look around.) Is this feature to avoid these errors to the public?

Mike

My TNG site: https://cushings.com/roots/public_tng/

Share this post


Link to post
Share on other sites
Ken Roy

Mike,

One option would be to use the TNG Maintenance Mode to prevent user access to your site while doing maintenance or GEDCOM imports.

Admin > Setup > General Settings > expand the Database section and change the value of Maintenance Mode:  to On, and when you are done, the change it back to Off

I know this nothing for your current situation, but will prevent user access to your site will doing maintenance in the future

Share this post


Link to post
Share on other sites
TNG_Mike

Thanks, Ken. This is a good lesson learned for next time. My site is up and running again. Unfortunately, I don't know before hand, in general, if I will exceed max_questions when importing a new tree. And I'm not sure if the import is the problem, or if it was the post-processing (putting the kids in order). The site shut down after I created a tree, imported a gedcom, then executed to post-import processes. I suppose it is safest, at least until I have more experience importing and processing new and updated trees, to use Maintenance Mode.

Share this post


Link to post
Share on other sites
Ken Roy

Mike,

If you are importing your data, there should not be a need to sort children nor sort spouses.  TNG will import them in the correct order based on you have set the order correctly in you genealogy program.   It is always best to put the site in Maintenance Mode when doing imports to stop the bots and users from accessing your site while it is changing.

you might want to take a look at the wiki article on Import Data

 

Share this post


Link to post
Share on other sites
TNG_Mike

Thanks, again, Ken. I had wondered whether this was necessary. I'll check out the article.

Share this post


Link to post
Share on other sites
TNG_Mike

Have you tried Maintenance mode with version 13? I'm updating a family tree. This time I put TNG in maintenance mode before starting the import. My TNG header says Maintenance Mode is On. I used another device to access my TNG site to verify that a public message about site maintenance would display. But it did not. It shows the error message about possibly making a mistake while upgrading, then

Query: SELECT * FROM tng_mediatypes ORDER BY ordernum, display
User 'cushing_cousin' has exceeded the 'max_questions' resource (current value: 75000) .

 

Share this post


Link to post
Share on other sites
Ken Roy

Mike,

you may need to resolve the issue as to why you are getting the " exceeded the 'max_questions' resource " error in the first place. 

Maintenance Mode works fine in TNG 13, but your hosting service is preventing access, so the message is not returned.

Sorry, I am not a web server system administrator, so I cannot tell you want you need to look for or change.  Since your hosting service is the one setting the limits, they should be able to offer some suggestions as to who is chewing up your resources.

 

Share this post


Link to post
Share on other sites
Michel KIRSCH

75000 is a very tiny number of transactions to import a tree !
Only your ISP can change this number of transactions.

What you can do :

Use a local copy of TNG (with wampserver or Laragon or else) and import your tree in your local copy.

When it's done, make a backup of your local tables (Admin>>Utilities>>Select All>> with selection : Backup)

Transfer all your tng_xxxx.bak files contained in your TNGRoot/backups directory to the same directory of your online site.

On your local site, restore your tables (Admin>>Utilities>>Select All>> with selection : Restore)

This will certainly use less transations.

Michel

Share this post


Link to post
Share on other sites
tngrlkrz
24 minutes ago, Michel KIRSCH said:

Transfer all your tng_xxxx.bak files contained in your TNGRoot/backups directory

Hi Michel,

I have, on occasion, considered this approach, but in my case has been unnecessary since I haven't encountered the OP's issues.  I assume this is a safe, 'fallback', approach since none of the path information is in the database itself, but stored in separate config files.  To date, I have only done the reverse, perhaps copying one dataset such as the "users.bak" from the web to laragon local for testing.  Doesn't one have to be careful copying the users.bak though because the local setup may have a small subset of users, perhaps even with different passwords than the website?

Share this post


Link to post
Share on other sites
Michel KIRSCH

Yes Ron, you're right.

So Mike, be careful with your users.bak file ! Do all what I said, but uncheck the case for tng_users...

Ron I do this operation once a week to synchronize my local site with my on-line site. In this case there is evidently no problem with the users table.

I semi-automatize the task with syncback free: (https://www.2brightsparks.com/freeware/freeware-hub.html)

1.Make à backup of my on-line tables

2. Use syncback to synchronize, .bak files, photos, medias, documents...

3. Restore the tables on my local site.

No problems, no losts, no gedcoms and the two sites are identicals

Michel

Share this post


Link to post
Share on other sites
tngrlkrz

Michel,

Thanks, I see that is a free backup solution.  Will review the sync aspect.   I have no special syncing for the TNG web sites (production and test sites), but I do make use of symbolic links (symlink) to simplify FTP, Filezilla, copying of gedcoms and media (I only have to copy one time).   On related backup topic, I use Terabyteunlimited's backup software to do full image backups of all  local PC partition volumes.

Share this post


Link to post
Share on other sites
Michel KIRSCH

Thanks Ron. Will take a look on these programs/capabilities.

Michel

Edited by Michel KIRSCH

Share this post


Link to post
Share on other sites
TNG_Mike

Thank you all for your suggestions. ISP confirms this is the limit of my shared hosting plan.

Michel: Thank you for that alternative. It sounds fairly straightforward, but since it's beyond my current experience level, I'm going to get some more experience with my TNG online to decide whether or not to go to this effort. If I end up updating databases only a couple of times a year, I may just live with the site crash and do my imports late at night.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×