ColdFusion SQL Server Error Too many open files error? - sql

I have an API developed in ColdFusion 9 that continuously searches for items and inserts a record on the outcome of that search into a SQL Server 2008 table but I'm noticing a lot of errors in my Application log for the following error:
Error Executing Database Query.[Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: X.X.X.X:X. Reason: Too many open files. The specific sequence of files included or processed is: foo.cfm, line: 203
I realise there's not much to go on here but that's all the info I have from the logs.
Anyone have the faintest idea what might be going on?!

I got a similar error from using and old version of Lucene. Because Lucene used an old version of apache commons io that would sometimes stop closing the file read by the Lucene Index. So every time someone woul do a search a file would be opened and never closed. Eventually we hit the file open limit which would cause various problem on the server. One Of which is you can't connect to a datasource.
We had to bounce the server a couple times to release the open files. And then we updated our Lucene software to the latest version.
I believe Lucene is what Solr runs on (the cf index).
This happened on a Linux machine and we were running java, not coldfusion (but cf runs on Java)

Related

SQL Server Browser won't start

I want to start playing around with databases in Java to help with my university work however I can't get SQL Server to work properly. I've installed it using the wizard and selecting 'Basic' the installing SSMS. However when launching SSMS I get Error 26. When researching this it says to make sure that the SQL Server Browser service is running. Unfortunately this is the issue, every time I try to start the service it fails.
All the fixes I've seen about this topic have been related to servers on another machine where as I am trying to run the server on my own PC. I've tried them anyway but nothing has worked so far. The only thing I can find that might give you a clue in helping me is that in the log file it says that it failed to register the SPN.
When working on my local machine, I don't usually need SQL Server browser - but my SQL Server itself isn't set up to run automatically.
You can go to services (either via window and search for 'services', or in Windows 10 open the task manager, go to the last tab 'services'). Find the 'SQL Server' service (it helps to sort by description column) and right click -> start.
If you take note of the name (default is 'MSSQLSERVER') you can start the service (e.g., in a batch file, from command line) using sc start "MSSQLSERVER" (or whatever your server instance is called).

User account pool creation encountered failure while executing the registerRext.exe in SQL server 2016 R services

the cmd execution of registerRExt.exe
I am trying to install RRE(Revolution R Enterprise) v7.5 with RR0 3.2.2(Revolution R Open) on a SQL Server 2016 RC0 default instance. All the steps shown in the https://msdn.microsoft.com/en-us/library/mt590808.aspx have been completed and the error occurs in the Post installation Server configuration scripts. The script has also been replaced by the updated script for RC0 shown on the msdn site but still I get the same error on running the registerRExt.exe file.
The site shows while installing the instance the account name for Server Database engine has to be MSSQLSERVER, however this had also resulted in an error stating wait on database recovery handle failed which was sorted by changing the account name of Database engine to NT AUTHORITY/SYSTEM(I provided this info as it can also be the cause of the problem) . Now I need to sort the user pool failure. Any help would be appreciated..thanks in advance
SQL 2016 RC1 was just released https://blogs.technet.microsoft.com/dataplatforminsider/2016/03/18/sql-server-2016-release-candidate-1-now-available/.
SQL RC1 has a newer version 8.0.1 version of RRE. I suggest your try to install it and reply to this thread again if you hit the same failure. https://msdn.microsoft.com/library/mt590809.aspx has the details on where to find Microsoft R Open 8.0.1 and Revolution R Enterprise 8.0.1.
If the issue persists RevoScaleR\rxLibs\x64\registerrext.log would have more details on the exact failure - do share that.
I was able to sort out the issue..It was because I was installing the SQL server on domain controller and ignored the warning while install, but then changing some rules and demoting it from Server Manager worked and the install was successful.
However I do know there may be some better solution to that as all the other user accounts got reset in the process.

Multiple SSIS Packages failing during ftp during ftp.GetDetailListing?

I have a whole bunch of SSIS packages that are failing during the GetDetailListing within an ftp script component of SSIS jobs. These were all working fine for years up until about 1.5 days ago. Currently they are all failing. We have traced it to the point of being the fact that the ftp itself is not set to passive. We can set the FtpClientConnection setting like this. :
FtpClientConnection.UsePassiveMode = True
Upon setting the above prior to the ftp connection being set, it will connect and work without error. What I am trying to determine prior to going through and fixing all these packages. Is what would have changed that would cause all ftps that were previously not set to passive to now require passive? At first I thought it was some sort of network setting or something of that sort but have been unable to determine what that would be. I can't believe that all the ftp locations that we were connecting to would have performed a security update all at the same time.
Any ideas? I am stumped and have been looking at this for > 8 hours now.
This ended up being our barracuda server. Upon being rebooted these failures just disappeared. An auto update to this server must have been the cause to all these issues.

Connecting to SQL server in ASP

I'm sure this has been answered before, but every example I try I can't seem to connect to my SQL Server.
I'm using SQL Server 2014, and the webpage is being hosted in IIS on Windows 7 x64.
I'm trying to get my webpages to build themselves recursively from information in a database, I've configured IIS to run ASP pages (I believe its classic ASP as opposed to ASP.net, but I may be wrong)
I started by looking at examples that basically returned all entries in in a particular column in a table, however when i got error messages on trying to load the page:
An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.
I tried stripping it down to bare minimum, i.e. just opening the connection to the database.
And even then I get the same error, here are a few of the examples I tried:
Example-1
Example-2
Example-3
Firstly if anyone could tell me how to debug it further, i.e. getting proper error messages that actually tell me something useful, that would be a good start.
If there's any information I missed then please ask.
If you've given your files the extension .asp then it is Classic ASP
Do you know what version of SQL Server you're using? If it's express then you need to say so in your connection string eg Data Source=yourserveraddress\SQLEXPRESS
I recommend using the OLEDB method in Example 3 rather than the ODBC method in 1 and 2 but they should all work. This is a good resource for Connection Strings
http://www.connectionstrings.com/sql-server/
If you follow the steps on this page you will be able to see more useful error messages
http://www.chestysoft.com/asp-error-messages.asp

When SQL Developer is idle I lose my connection

My problem is this: I am running Oracle 10G on windows 98 on a virtual machine using VMWare on my desktop computer. I can connect to several users (SYS, HR, OE, ... ) with SQL Developer (which is on my desktop not on the virtual machine) but if a don't run any SQL statement for a short while, say about 2 minutes, I lose my connection and get an error like connection closed or IO-fault:connection reset by peer.
Could this have anything to do with the sp_reset_connection?
When I open SQL Plus on my virtual machine itself I don't lose the connection at all, even if it has been idle for 30 minutes or longer. So now I'm thinking there could be a problem between the Virtual Machine and my desktop computer. Before this all worked fine.
I tried closing recently installed anti-malware apps without any result.
Anybody has an idea what I could do to fix this problem?
Kind regards,
Veek
I stumbled upon the Keep-ALive Extension and tried it as well but without succes. Standard it is set to a 2 minute interval. I've changed this value to 1 and to 60 minutes but as soon as I stop running statements for a short while I lose my connection. There must be something else. I've already installed the newest SQL Developer version but still it is the same. (I did import the settings from my earlier release maybe I have to try without importing them.)
Any other suggestions perhaps?
Kind regards,
Veek
This extension works for SQL Developer 4:
https://github.com/scristalli/SQL-Developer-4-keepalive
DISCLAIMER: I'm the developer of the extension. I hope the answer is not considered advertising, because this extension is open source (and the previous non-open-source extensions were accepted as an answer).
MinChen Chai has created Keep-Alive Extension exactly for your situation:
https://sites.google.com/site/keepaliveext
It will continually send TCP keep-alive packets and prevent server disconnection by inactivity timeout.
When used with the latest SQL Developer Version 4.0.0.13:
- MinChen's extension (http://sites.google.com/site/keepaliveext) doesn't work.
- The keepconnext extension (http://sites.google.com/site/keepconnext) too doesn't work anymore.
On SQL Developer go to Tools > Preferences > Databases > Instances Viewer. and the option traffic duration change it to the max, this worked for me.
Go to Tools > Monitor Sessions... and select your Connection. Set the refresh value to 60 (seconds).
While monitoring, your connection will not be lost.
Oracle SQL Developer Version 4.1.3.20
As the suggested extensions in this thread have had issues with recent versions of SQL Developer, I tried my way and got scristalli's code to work in a new project based on his code AND the oracle example repo.
Needs a lot of work but oh well, at least I can install the new build on SQLDev v19.2 and it works as expected.
Disclaimer: I'm the owner of the linked repo, although it's MIT as the previous versions. Feel free to fork it, pullrequest-it or do as you like