connection

HTTP Connection Pooling

不打扰是莪最后的温柔 提交于 2019-12-03 16:25:37
Service A calls into service B via HTTP. This happens frequently, and the size of transferred data is not very big. I discovered that re-using the same TCP connection to send multiple requests from A to B seems to improve latency. Naturally, the idea of connection pooling comes to mind: Open multiple connections to service B and keep them alive When A needs to make a call to B, provide it with one of the connections from the pool Implementing this involves solving some problems which are outside of the scope of what I'm trying to do, so I'm looking for a cheap way to implement this (maybe have

JDBC connection timeout cannot reconnect

半城伤御伤魂 提交于 2019-12-03 16:24:07
I have my Spring Hibernate web application running on MySQL that gives me trouble. I have searched around and tried different configurations, read quite a few threads on this website, but it still pops up its smiling head. The error message is: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 63,313,144 milliseconds ago. The last packet sent successfully to the server was 63,313,144 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing

To close or not to close an Oracle Connection?

我只是一个虾纸丫 提交于 2019-12-03 15:57:27
My application have performance issues, so i started to investigate this from the root: "The connection with the database". The best practices says: "Open a connection, use it and close is as soon as possible", but i dont know the overhead that this causes, so the question is: 1 -"Open, Use, Close connections as soon as possible is the best aproach using ODP.NET?" 2 - Is there a way and how to use connection pooling with ODP.NET? I thinking about to create a List to store some connections strings and create a logic to choose the "best" connection every time i need. Is this the best way to do

What are some best practices for debugging Qt signals and slots?

 ̄綄美尐妖づ 提交于 2019-12-03 15:01:16
问题 Debugging signals and slots can be hard, because the debugger does not jump to the slots of a signal when it is emitted. What are some best practices for debugging Qt signals and slots? In particular How do I make sure connections are set up successfully? When should I use signals and slots, when should I avoid them? What are the most efficient debugging techniques from your experience? 回答1: There was a blog post written a while back called 20 ways to debug Qt signals and slots It addresses I

Python psycopg2 timeout

北战南征 提交于 2019-12-03 14:55:07
问题 I have a huge problem: There seems to be some hardware problems on the router of the server my python software runs on. The connection to the database only is successfull about every third time. So a psycopg2.connect() can take up to 5 minutes before I get an timeout exception. 2014-12-23 15:03:12,461 - ERROR - could not connect to server: Connection timed out Is the server running on host "172.20.19.1" and accepting That's the code I'm using. # Connection to the DB try: db = psycopg2.connect

oledb connection string for Excel 2016 in C#

纵饮孤独 提交于 2019-12-03 14:51:53
I have been trying to access 2016 MS Excel file using C#, but connection string is working only till 2013 MS Excel. My current connection string: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx; Extended Properties="Excel 12.0 Xml;HDR=YES"; Is there any modified oledb connection string for MS Excel 2016? This occurred for me after upgrading from a local install of Office 13 to Office 16 through the Office 365 program. I was getting this exception: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. I was not able to find a way to

MySQL remote connection [not as usual]

感情迁移 提交于 2019-12-03 14:33:11
问题 I'm not getting to get access to mysql externally. I think it's mysql or firewall stuff or some privilege within the mysql. I already tried doing steps that are on internet. I'll put the process step-by-step to exemplify what I'm doing and to serve as a tutorial for another people that has this same problem: I'm using: -ubuntu server 12.04 -mysql-server5.5 -there is NO hardware firewall just software one 1- First I installed mysql with: sudo apt-get install mysql-server 2- I changed the root

Inno Setup: add GUI to connect to SQL

一曲冷凌霜 提交于 2019-12-03 14:02:51
问题 Complete Inno Setup and Pascal newbie here. I want to package a single .sql file inside a setup.exe . The setup will be available for download so I can't embed any connection strings within the setup project. The setup basically installs an .NET CLR assembly (dll as hex stream) into the supplied SQL server database by running a simple .sql script I've seen the other posts on here about connecting to an SQL server but none address my issue of a hardcoded connection string or replicating

What max_connection should I set for MySQL?

て烟熏妆下的殇ゞ 提交于 2019-12-03 13:46:56
问题 I am using MySQL 5.1.35 database on Linux Centos . The Linux server has 2GB RAM with 14GB of disk space . I have created webservices using Restlet framework in Java which has thousand user access. I want to set max_connection for maximum concurrent connections. So please suggest me that what max_connection should I set? Thanks in advance. 回答1: You need to calculate the memory required by your MySQL engine. See manual here If you are using MYISAM tables then you can calculate memory

HttpsURLConnection and intermittent connections

二次信任 提交于 2019-12-03 13:31:29
问题 I'm hoping someone could help me out with intermittent connections I'm getting using code with HttpsURLConnection. The code I'm using is below: HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setReadTimeout(10 * 1000); if conn.getResponseCode() != 200) { Log.v(TAG, "error code:" + conn.getResponseCode()); } The connection works the first time everytime when I use it to pull a json file. However, when I use the connection again to send a command, it always fails the