F3 Fat Free Framework DB::() works on one database, but not the other (same host) - fat-free-framework

Just had some code developed on the F3 framework, which I'm not very familiar with. Essentially, the index page contains one database connection as such:
F3::set('DB',
new DB(
'mysql:host=71.123.123.32;port=3306;dbname=DBNAME',
'DBUSERNAME',
'DBPASSWORD'
)
);
This was developed using a dev database on the same host. We are now switching to the live db, and suddenly we are receiving server errors and max php memory limit warnings. Has anyone had this happen to them before? We are confused, and the developer is pretty stumped as well. He has used the typical F3 setup, nothing additional. Thanks in advance for any comments/suggestions...

Related

How to resolve Microsoft Access Error 3043

My company uses a shared MS Access database, with a back end stored on a server and a front end copied onto users desktops.
Recently, our IT department moved us to a new server without giving us any notice, and now our database keeps crashing.
Every 20-40 minutes, users get an error message that says:
Error 3043 Your network access was interrupted. To continue, close the database, and then open it again.
If they close and reopen, it does work. However, I'd like to stop this from happening, since it typically happens when they are in the middle of something and have to re-do everything.
I've already spoken with our IT consultants and they see no issue with our server/network, nor do they know anything about Access and therefore are no help.
Does anyone have any experience with this or have any ideas that may help me repair my database?
Thanks in advance.
Here are some thoughts:
It sounds very much like (short) network interruptions. MS Access doesn't like these at all, in particular it doesn't recover from a broken connection (even if very short) until you restart the frontend.
Network interruptions during write operations on Access backends are the prime cause of backend database corruption. Consider yourself lucky if you haven't experienced that yet. But you should backup and Compact&Repair the backend often (!) .
You can prevent backend corruptions by moving the backend to a server database, e.g. SQL Server Express (free). Errors will still occur ("ODBC call failed" instead of error 3043), but they will only affect the frontends.
You can probably work around all errors by changing the frontend from bound forms to unbound forms. This is a major undertaking.
I don't think there is anything you can do with the backend to prevent the errors.
If this database has value to your company, and IT says there is no problem, I suggest you escalate the problem to someone who can make IT look closer into the issue.
(How to do so would be a separate question, perhaps on SuperUser.)

Classic ASP response times varying extremely

I am working on a set of Classic ASP (VBScript) websites under different domains with 64bit Access (2013) database connection. Server is a shared Windows Server 2012 with IIS 8.5. The sites were not coded by me.
Everything seems to work fine for a time, but after several page calls (sometimes also at the first or only call to the site) the server does not respond for more than 20 to 30 seconds. This means: I can't call ANY page hosted on this server, even all other websites under different domains stop working for that time.
I am not sure, if plain HTML pages will respond, but it seems not. After such an issue everything is running fine again for various periods (up to 1 or 2 minutes), pages show up with normal response time, then this system hang repeats. And so on…
Finding the problem is extremely difficult, because all the sites on this shared hosting server could possibly cause this behaviour, it not necessarily seems to be triggered by my specific page call or subsequent calls, though it could be.
I am not sure, where to even look for the problem. I searched this forum and noticed some interesting answers, but not exactly to our problem. I tried Sysinternal's Process Monitor on a virtual server, where only one specific site is hosted and the same issues exists, but was not able to interpret most of the messages. I looked into event viewer log at this machine and noticed entries saying:
A trappable error (C0000005) occurred in an external object. The script cannot continue running.
But even if that sounds to be a possible reason, I am not sure where to look in the script or a log file, where I could find the trigger of all that. And on the shared host I don't even have the possibility to do that. On our local 'internal webserver' under Windows 10, where local copies of all the sites reside, I can. But I'm not sure, where to start my search.
Any help would be appreciated (and please don't needle me with proposals for switching to ASP.net or SQL - this is not possible at the moment).
I work with huge classic ASP application this error normally happens in a call for a Server.CreateObject('foo'). We have this kind of error here normally at the excel object when someone try to upload a very large .xls file. I would start mapping all the Server.CreateObject.

Intermittent "Out of present range" from Classic ASP after migration from SQL Server 2000 to 2008 & IIS6-IIS7

Background: I have just completed a move of approximately 50 classic ASP sites from an IIS6/Sever 2003 and SQL Server 2000 environment to a new virtual environment of 2 machines behind an nginx load balancer. Each MS machine is running IIS7.5 and SQL Server 2008 R2. They current each have 6Gb & 2 VCPUs. The databases are set up in a mirroring configuration (currently without a witness).
During testing all sites appeared to function correctly.
Once live traffic started to hit the sites it became apparent quite quickly that the initial resource allocation (2Gb & 1 VCPU was way too low and was quickly increased). The main problem has come from an intermittent ASP error occuring on approximately 10 (and probably including the busiest) sites on the servers. They will produce a 500 response from an ASP error of
Provider error '8002000a' Out of present range.
All research has pointed to causes such as numbers too large to fit into an integer variable and some people have mentioned some correlation with the newer implementation of RAND and NEWINT() in SQL Server 2008 compared to 2000. The stored procedures that appear to cause the error are relatively simple, with some as simple as accepting a single VARCHAR parameter (well within the limits) and doing a single column select on a table. Most do not even involve INTs at all and if they do, the values are well within range.
The error can appear on one machine for a given amount of time while during this same time the other server will not necessarily have the error, it sometimes will though. After a while the error will stop occurring, this doesn't seem to correlate with excessively overloaded system resources either.
ASP to database is done via a DSN using SQL Server Client 10 drivers. The code is using the ADODB connection and command objects. This code has been working happily for 6+ years on the previous servers. The databases are set to compatibility mode 80 (SQL Server 2000).
Can anyone shed any light on where I should be looking to try and solve this please? If there is any other information I can share, specific code snippets etc please just let me know.
Update:
I thought the UPDATEUSAGE answer below had got it but unfortunately it reared up again a little later. After some thinking I've had the following thoughts... There are two instances of IIS, independent of each other, they both talk to a single database whether it be local at the time or not, they both execute identical sync'd code with code that has been working with the same syntax and valid variables for a long time. As the ASP execution through IIS is the only layer in this equation that is not a single point as it were this is where I've headed. When the problem reoccurred, I restarted IIS on the machine at that point that was showing the error (the situation is often that it is only occurring on one of the two servers). The restart of IIS appeared to cure the problem. It then happened on the other server with a different site, again restarting IIS appeared to sort the issue.
Further reading has now lead me to the "Managed pipeline" modes of the app pools. They are currently set to "Integrated". I've done some reading and I'm wondering if they should be set to classic to emulate IIS6. Does anyone have any more thoughts on this?
Many thanks
Eric
Did you:
(1) Update usage counters: In earlier versions of SQL Server, the values for the table and index row counts and page counts can become incorrect. To correct any invalid row or page counts, run DBCC UPDATEUSAGE on all databases following the upgrade.
(2) Rebuild all Indexes
Upgrading from SQL Server 2000 to 2008
I had the same problem and tracked it down to a field definition in my database i had defined as a long integer. the value i had in there was some like 53435534126262 , immediately changed it to a text field and the problem disappeared
try that??
I thought it might be useful to post my findings and solution to this problem as I found no where on the web that mentions the same situation I had.
I went through a number of steps that each seemed to reduce the frequency of the errors but not eliminate them. Firstly I changed the database authentication method to SQL instead of Windows based. At first I changed all the sites to use the same login but later on I changed them to all use a unique login.
I updated the SQL Server with service pack 2 and cumulative update pack 3.
As mentioned, the above steps reduced the frequency of the errors but didn't stop them. I started looking through the class that all the sites use to manage their database connections and use of stored procedures. I came across the line adocommand.parameters.refresh I read up on what this actually does and when called it makes a call to the database to retrieve the parameters of a given stored procedure so that they can be accessed as an object in ASP rather than the parameters having to be given in a particular order and manually assigning the types to them. On the Microsoft page that details this method it has a little footnote that says
Parameters.refresh will fail in some situations or return information that is not entirely correct. Parameters.refresh is particularly vulnerable when used on ASP pages.
This was all it gave and I couldn't find any other details about this. I increased the logging on my sites to, on error, output what parameters.refresh had returned. I caught it in one instance returning the two variables from the stored procedure, with the correct names, but not with the correct variable types. They should have been a VARCHAR and an INT but they came back as both being CURRENCY. Obviously this then errors when you try and assign a string to a CURRENCY. I only managed to catch this one instance of an error before I fixed the problem.
The only way I found that seemed to fix the problem was to change from using an ODBC based driver, both DSN or DSNless, and use the SQL Native Client OLE DB driver with the "PROVIDER" keyword. This had the added benefit of appearing to enable connection pooling when it previously didn't appear to have been working.
One side effect of changing to the driver is that the stored procedures and ASP became susceptible to intermediate results being returned from the stored procedure if there were multiple statements within it and it didn't have SET NOCOUNT ON explicitly set at the top. Rather than trying to update 1000+ stored procedures, I found that the NOCOUNT flag can be set at the database instance level for all databases which solved this problem.
I hope this helps someone, as it was an incredibly frustrating 3 weeks that I spent tracking down this problem. Feel free to ask any further questions and I'll help if I can.
Thanks
Eric

Query not returning result when the program is executed from the compact disc

I have build application in visual basic 6.0 and using access 2003 as database. My problem is that when I burn the application and the database in the c.d. and then run the application from the cd, the query return only one row. But when the application is run from the hard disk of the computer, it is working properly. Please help me, I am in a great trouble!!!
The comment given by Mr. David W Fenton is acceptable as an perfect answer for the question. Actually when the database is read only then it will not execute the query as we want to. So, always uncheck the read only mark.
It will be better to copy the database from the cd to any drive of hard disk and then code the program to make the datbase normal (i.e. not read only). Then execute your query, it will return all the rows.

Access and classic ASP error 80004005 System resource exceeded

An old site on shared hosting has developed an error when executing a simple SQL statement
Microsoft JET Database Engine error '80004005'
System resource exceeded.
/411971/users1.asp, line 68
Line 68 is Set objCon = objCommand.Execute
The Access database isn't large (less than 2Mb), this is a single table query and the table only contains around 500 records. Field count is only about 20 too with no memo fields. Nothing has changed in the script. A compact/repair on the database has no effect, as does creating a new database and copying the table in question too it.
Looking round in the web this would appear to be most likely a web server issue rather than the code (and the behaviour would indicate this too) but I'm not finding anything conclusive - and knowing how shared hosting support works I'd like to have a definitive case before I go to them. Has anyone else seen this error/behaviour before and what was the problem/solution.
OUTCOME: I made sure I'd tried all the obvious approaches then emailed the ISP support who confirmed it was a server issue and restarted services, which fixed the problem
It may simply be a connection limit. On shared hosting with other sites using the same backend the limits are easily hit. Whilst you can help by making sure you explicitly close any connections after your script has used them, in the end this would be a hosting issue your provider would need to look at.
This is probably not what you want to hear, but Access/Jet is an unsuitable database backend for a web application. I got hangs and inexplicable errors like this from it with just a couple of concurrent users. When MySQL and SQL Server Express are free there is no reason to use Access on the web.
If the issue happens again, just ask your hosting provider to recycle the application pool on IIS.