Server crashed from traffic spike, now getting database connection error - database

So I posted a new blog on my site and promoted it on my facebook where the traffic spike was far bigger than anticipated, the server went down from the volume of traffic and after it was rebooted I am now getting a database connection error.
I contacted my server host and they told me this:
"I was able to get the relevant database details from the wp-config.php file in the home directory for your site and, using those creds I am able to connect to the relevant database without a problem.
To be sure that I was able to connect AND make a query to the database I have also created a simple test script that can be viewed at http://yoursite.com/mysqltest.php
This confirms that the server is responding correctly and that the database itself is able to accept connections and queries.
This leaves us with the likelihood that the issue lies with the scripting/configuration of the wordpress installation which is not something I am going to be able to assist you with.
I suspect that the problem lies with the wp-config.php file but cannot be certain."
I can't see how the wp-config would have changed, I haven't touched it in over a month and it's been working fine otherwise. The website was also working fine after I posted that blog, it was only after the server was rebooted that it doesn't. All the other sites on the server remain in perfect working condition. I don't see how a traffic spike could have done this. I'm lost as to what to do next? Please help! :(
D

Try this database connection test script https://gist.github.com/162913

Related

Error establishing a database connection on wordpress sometimes

i have a blog with wordpress but sometimes i have problem with that
i got blow error
« Error establishing a database connection This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at %s. This could mean your host's database server is down.
Are you sure you have the correct username and password? Are you sure that you have typed the correct hostname? Are you sure that the database server is running? If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums »
by searching the internet some say that it can come from the database connection information but my concern in my case is that it only happens occasionally and if I wait 5 minutes and I refresh again, the site works again correctly, then if I wait a few hours and I try to reconnect the problem comes back again… it happens in my back end and my front end, I have searched in vain I can't find anything in my case please please help friends, here is the URL of the site:
(https://www.creationsjennah.fr/) host is 1&1 IONOS : offer web hosting option in business plan
I would like to remind you that I am probably the only one to use the site, it is in the test phase in an online environment, I see it in the statistics of my site.

Wordpress website db connection error

I came over this serious problem.
My WordPress website was running all right. suddenly It showed the page of WordPress installation. so, I quickly registered a user and so on. Then it showed "db connection error". I went to my server and tried to log into my phpmyadmin but the password didn't work. This kept happening for 5 mins. then thing worked normal again.
1- is this a hacker attack?
2- how do I prevent the page of WP installation from showing up if the db connection goes down again? because this is a desaster
how do I prevent wp-admin from showing the name of my db in the db connection error ? Better preventing any error report from my website when anything is down?
thanks
Nobody can tell you whether it was hacker related without a lot more information. There should be logs on the machine hosting your site--I would check them first to see if you can tell if the database went down and why. If you don't admin your own site you can ask your hosting provider what the problem was--they may have been rebooting a database machine, for example.
I would also do a full backup of your site and database in case there is any hardware trouble you don't know about.
In the meantime, if you administer the site yourself, take a look at advice for hardening Wordpress: http://codex.wordpress.org/Hardening_WordPress

SSRS 2012: "The report execution has expired or cannot be found. (rsExecutionNotFound)"

I am using SQL Server Reporting Services 2012 and received this error without any known cause: The report execution eqaiekfzmk2snc55y0zrow55 has expired or cannot be found. (rsExecutionNotFound).
While I have found other posts describing problem through Google searches, the resolutions did not help me:
Restarting SQL Server, SQL Server Agent, and SQL Server Reporting services
Increasing the Execution Timeout through SQL Server Management Studio when connected to the Reporting server
Adding rs:ClearSession to the URL querystring (and trying IE, Chrome, and Firefox)
Redeploying after each troubleshooting step and retesting
I looked in the Reporting Services log file folder C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\LogFiles but I see the datestamp is over two months old and I could see nothing related to the symptom.
I looked looked in ExecutionLog3 and did not see anything related to the symptom. use ReportServer; select * from ExecutionLog3;
To find out what did work, I verified that:
The query and results are sound, as seen in Management Studio
I can preview the report in Data Tools on the server
I can view the report when remoting into the server
I only see the error when viewing the page from outside the server. This is a relatively lightweight query and result set, so I cannot believe that this problem has anything to do with execution timeouts.
I changed the name of the file and redeployed. I am able to see that report now, but this isn't a true resolution because I still don't know what is truly causing the problem and how to fix it. If the symptom appears again, I can't keep changing the filename and redeploy.
Is there a way to get a better idea of what is happening? A specific log file or a property I need to change?
Update:
I thought I had this problem worked out, but apparently not. I found nothing useful in the error logs: only a restatement of the same error message visible in the browser. When I redeploy (using SQL Server Data Tools), the error goes away... for a few hours or until the next day, when I need to redeploy to make the error go away.
I know this is an old question but I had this problem recently and it turned out to be a bad session cookie. The cookies session-id matched the guid in the error message and once I deleted the cookie all worked fine after that. The report at one point had been configured to cache a temporary copy
but that had since been turned off (however, the problem existed before that had been turned off so it may not be relevant).
Hopefully this answer will help someone else save the hour I spent figuring it out in my environment :)
This might help someone.
In my case, The report url had trailing spaces (a silly mistake) which caused this.
I've added &rs:Command=ClearSession to the end of my url and works fine with me.
As stated in a different answer you can clear the session which usually resolves this issue.
If you have a question mark in your URL already then add the following to the end.
&rs:Command=ClearSession
If you do not have one then you need to add the following to the end.
?rs:Command=ClearSession
I just had this problem, it was for an existing report that had been working correctly. However, the Report Builder had been open for some time in another window while I was working on something else, and I hadn't saved my work (I was applying a filter, and didn't want to save my changes with my test filter). It occurred to me that since the report HAD been working, but it had been sitting idle, it might have gone stale. I opened the Dataset Properties, clicked Query Designer, then "Run Query". The Query Designer then got a fresh request from the data source. I closed the Dataset Properties window and clicked "Run", and my report was again displayed.
For me, I had no trailing space.
Some people had luck with clearing Session.Keys of "Microsoft.Reporting.WebForms.ReportHierarchy"
I solved it by Session.Clear in the global.asax
For us, the error appeared trying to run a report on an SSRS 2016 server using Internet Explorer 11. The user had created a bookmark that linked directly to the report. What may have happened: IE preserves cookies and temporary internet files for favorites to "help them load faster". The user may have initially ran the report, then created the bookmark to the report which contained session information.
To fix: Delete the bookmark, then cleared browser history in IE (CTL+SHIFT+DEL) being sure to uncheck "Preserve Favorites website data".

SQL server 2005 Connection Error: Cannot generate SSPI context

Provide Used: Microsoft OLE DB Provider for SQL Server. Can anyone help me with this..
I was trying to connect with LLBLgen
This MSDN blog page has some useful on this...
http://blogs.msdn.com/sql_protocols/archive/2006/12/02/understanding-kerberos-and-ntlm-authentication-in-sql-server-connections.aspx
In my case, I found the account was locked.
Reason was I previously, on another machine more than 3 times tried to login.
It did not recognise me - and tthen finally it locked my account.
Reopening account made all work fine.
br
Jan
The error you get is almost always caused by a problem with using Windows Authentication. Please try switching to a SQL server login (username/password), or make sure your current Windows login has access to the SQL server and database you're trying to connect to.
-Edoode
I fixed this by mapping a drive to the server running MSSQL. This seemed to generate some kind of trust that allows MSSQL to connect without this error even after a reboot.
I used to get this error sometimes when connecting to my local SQL Server with Windows Authentication. I never fixed it unfortunately - it went away when I reinstalled windows.
I think a reboot used to fix it - have you tried that? Not exactly the best solution, I know :P
Try to synchronize your date and time with the your domain's. The SSPI issue may be related to Active Directory authentication problems, some of them related to date and time changes. This is very simple to check and fix. Try it out!
There is a Microsoft KB article that addresses many of the reasons for this area (KB811889) at the following URL: http://support.microsoft.com/kb/811889.
A lot of Googling shows that one of the diagnostic steps helped most people who encountered the issue.
I recently had this exact issue where I'd get this error only when authenticating with certain accounts, but not others. Ultimately what was causing my problem was not mentioned in any KB or article I found on the net, but through trial and error I discovered that when the account used through SSPI authentication to SQL Server (2k8) happened to be in a large number of groups (in my case over 250) you would get the "Cannot Generate SSPI context" error. I suspect it has something to do with overflowing the security token that Kerberos uses and have seen similar strange authentication problems for user accounts in a large number of groups.
I get the problem when I have the time set differently on my client machine than either the server or the AD machine ( I was trying to test into the future).
Short Answer: Have you recently change the user the service is running as? Was there a system crash?
Long Answer:
I know this is old, but I want to post my experience that I just had.
We had spent hours Googling and found nothing that worked.
Eventually we ran across a set of actions that could cause this:
If you change the user that the Sql Server runs as (e.g. from Local System to a domain usr) and do certain updates and the server doesn't safely reboot -- you get this.
So, we set things back to Local System and bam it worked. Swapped it to the domain user, no worky worky. Ok. Swapped it to Local System, rebooted, swapped it to domain user, rebooted, bam -- worky worky. All was good in our world. Later that morning it crapped out again... still working on that now but the priority is changing and I'm not sure we're going to continue work on this problem so I wanted to post something in case this happens to someone else.
What caused ours was we did an update and, apparently, we learned that it's bad practice to let Sql Server run as Local System so we changed it to a domain user. We never rebooted, but restart the service. A month later, we do updates. We don't reboot. A month goes by and a power strip fries causing the server to have an unexpected shutdown. Yet another month later we find out problem because we rarely connect to this particular database (Interestingly, Sql Server 2008 worked fine... it was only 2005). Or... at least this is the best we've come across.
Our admin guy doesn't like Vista and likes to blame everything on Vista (refuses to let us test Windows 7)... so he Googled "sspi vista" or something like (I know it had sspi and vista, but it might have had another one... in case you need to Google it was well) that and ran across an article that pretty explained our scenario after we had a meeting we all remember these pieces and placed this picture together.
In my case, the time synchronization issue in the Windows 2003 domain environment was actually the issue.
This was quite easy to overlook as the two had been on two different time zones, whilst showing the same times on their clocks; which in effect was about 1 hour apart.
So other than the time on their watches, check the time zones as well.

Why do I get this error "[DBNETLIB][ConnectionRead (recv()).]General network error" with ASP pages

Occasionally, on a ASP (classic) site users will get this error:
[DBNETLIB][ConnectionRead (recv()).]General network error.
Seems to be random and not connected to any particular page. The SQL server is separated from the web server and my guess is that every once and a while the "link" goes down between the two. Router/switch issue... or has someone else ran into this problem before?
Using the same setup as yours (ie separate web and database server), I've seen it from time to time and it has always been a connection problem between the servers - typically when the database server is being rebooted but sometimes when there's a comms problem somewhere in the system. I've not seen it triggered by any problems with the ASP code itself, which is why you're seeing it apparently at random and not connected to a particular page.
I'd seen this error many times. It could be caused by many things including network errors too :).
But one of the reason could be built-in feature of MS-SQL.
The feature detects DoS attacks -- in this case too many request from web server :).
But I have no idea how we fixed it :(.
SQL server configuration Manager
Disable TCP/IP , Enable Shared Memory & Named Pipes
Good Luck !
Not a solution exactly and not the same environment. However I get this error in a VBA/Excel program, and the problem is I have a hanging transaction which has not been submitted in SQL Server Management Studio (SSMS). After closing SSMS, everything works. So the lesson is a hanging transaction can block sprocs from proceeding (obvious fact, I know!). Hope this help someone here.
open command prompt - Run as administrator and type following command on the client side
netsh advfirewall set allprofiles state off
FWIW, I had this error from Excel, which would hang on an EXEC which worked fine within SSMS. I've seen queries with problems before, which were also OK within SSMS, due to 'parameter sniffing' and unsuitable cached query plans. Making a minor edit to the SP cured the problem, and it worked OK afterwards in its orginal form. I'd be interested to hear if anyone has encountered this scenario too. Try the good old OPTION (OPTIMIZE FOR UNKNOWN) :)

Resources