Questions tagged [connection]

Refers to a connection used to transfer data between two endpoints, such as between a client and a web, database, web service or other server.

A connection is a session established between two communications endpoint applications.

10252 questions
16
votes
4 answers

node js: check mysql connection before a query

I use node js with mysql and want to avoid that the app crash on connection errors.At the moment i use this : function mysql_handleDisconnect() { mysql_connection = mysql.createConnection(mysql_config_obj); // Recreate the connection, since …
user3776738
  • 214
  • 2
  • 10
  • 27
16
votes
5 answers

Python AttributeError: 'module' object has no attribute 'connect'

I'm trying to create a program with sqlite3 database using Ubuntu (Xubuntu 14.04) and the pre-installed version of Python. I tried if the first lines are working but there is already an error. I installed "python-sqlite" and "sqlite3". Can anyone…
mschoenwaelder
  • 163
  • 1
  • 1
  • 4
16
votes
4 answers

PHP/PDO: How to get the current connection status

What is the PDO equivalent of: mysqli_stat($dbConn); P.S. I use it to (get a message to) make sure I am connected
Omar
  • 11,783
  • 21
  • 84
  • 114
16
votes
14 answers

Confusing PDO-only problem : Can't connect through socket/Access denied/Can't connect to server (shared host)

So the problem changed from what it was, i'll leave the original question below to prevent bad reviews on answers like I had after someone editing his question I answered : So I am working on a (really lame) shared hosting which has PDO installed,…
Julien
  • 9,312
  • 10
  • 63
  • 86
16
votes
4 answers

pooled connection timed out

On the production server sometimes randomly the connection fails to the ORacle database. I get a lot of Oracle.DataAccess.Client.OracleException Pooled connection request timed out at…
Coder
  • 886
  • 1
  • 12
  • 28
16
votes
2 answers

WebSocket send extra information on connection

Is there a way for a WebSocket client to send additional information on the initial connection to the WebSocket server? I'm asking because I want the client to send the user ID (string) to the server immediately. I don't want the client to send the…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
16
votes
2 answers

Getting a JDBC connection from EclipseLink

using EclipseLink as JPA 2.0 provider, I can obtain a JDBC connection by simply calling Connection con = entityManager.unwrap(Connection.class); But I'm unsure what I'm responsible for. Do I have to close the connection after submitting my queries?…
user1494080
  • 2,064
  • 2
  • 17
  • 36
15
votes
5 answers

How to obtain the list of Oracle's SIDs

I have the host, port, user id and password but missing SID for connecting to Oracle DBMS. How can I find the list of SIDs on that server?
Roman Kagan
  • 10,440
  • 26
  • 86
  • 126
15
votes
2 answers

Using Directory.Exists on a network folder when the network is down

My company's code base contains the following C# line: bool pathExists = Directory.Exists(path); At runtime, the string path happens to be the address of a folder on the company's intranet - something like \\company\companyFolder. When the…
user181813
  • 1,861
  • 6
  • 24
  • 42
15
votes
2 answers

Mongo opens too many connections

I am trying to write a lot of data to MongoDB, in a Java loop. I am getting errors based on the number of connections open. My theory is that since MongoDB is not transactional, lots of connections can be opened simultaneously. However the Java code…
Ankur
  • 50,282
  • 110
  • 242
  • 312
15
votes
9 answers

Database Laravel php artisan migrate connection refused

When I use 'php artisan migrate' I get the following error message: [Illuminate\Database\QueryException] SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = homestead and table_name =…
Femke
  • 151
  • 1
  • 1
  • 4
15
votes
15 answers

Initial connection to SQL Server Connection Is Slow. Why?

I have run into a situation with a C# application installed at two sites where the initial connection to SQL Server is extremely slow. I wrote a test application to verify where the slowdown occurs and it is on the first SQLConnection.Open…
user281677
  • 249
  • 1
  • 2
  • 9
15
votes
5 answers

check internet connection in cocoa application

How do I check internet connection in an OS X cocoa application? Can Apple's iOS Reachability example code be reused for this purpose? Thanks, Nava
Nava Carmon
  • 4,523
  • 3
  • 40
  • 74
15
votes
2 answers

spring or hibernate connection leak

I am using spring with hibernate on a webapp (hibernate-core-4.3.8.Final and spring 3.2.11.RELEASE). I am using hikaricp (v 2.2.5) as the connection pool impl which detects a connection leak and prints the stacktrace below. I am using spring's…
abdel
  • 643
  • 1
  • 5
  • 13
15
votes
1 answer

Get signal strength of WIFI and Mobile Data

In my app I need to check the connection speed of both WiFi and Mobile Data and then compare it, then switch to which ever network has the highest speed. So how can I get the speed or best signal strength of wifi and mobile data? how can I switch…
WISHY
  • 11,067
  • 25
  • 105
  • 197