Search Results

Search found 15966 results on 639 pages for 'connection'.

Page 1/639 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Tomcat JNDI Connection Pool docs - Random Connection Closed Exceptions

    - by Andy Faibishenko
    I found this in the Tomcat documentation here What I don't understand is why they close all the JDBC objects twice - once in the try{} block and once in the finally{} block. Why not just close them once in the finally{} clause? This is the relevant docs: Random Connection Closed Exceptions These can occur when one request gets a db connection from the connection pool and closes it twice. When using a connection pool, closing the connection just returns it to the pool for reuse by another request, it doesn't close the connection. And Tomcat uses multiple threads to handle concurrent requests. Here is an example of the sequence of events which could cause this error in Tomcat: Request 1 running in Thread 1 gets a db connection. Request 1 closes the db connection. The JVM switches the running thread to Thread 2 Request 2 running in Thread 2 gets a db connection (the same db connection just closed by Request 1). The JVM switches the running thread back to Thread 1 Request 1 closes the db connection a second time in a finally block. The JVM switches the running thread back to Thread 2 Request 2 Thread 2 tries to use the db connection but fails because Request 1 closed it. Here is an example of properly written code to use a db connection obtained from a connection pool: Connection conn = null; Statement stmt = null; // Or PreparedStatement if needed ResultSet rs = null; try { conn = ... get connection from connection pool ... stmt = conn.createStatement("select ..."); rs = stmt.executeQuery(); ... iterate through the result set ... rs.close(); rs = null; stmt.close(); stmt = null; conn.close(); // Return to connection pool conn = null; // Make sure we don't close it twice } catch (SQLException e) { ... deal with errors ... } finally { // Always make sure result sets and statements are closed, // and the connection is returned to the pool if (rs != null) { try { rs.close(); } catch (SQLException e) { ; } rs = null; } if (stmt != null) { try { stmt.close(); } catch (SQLException e) { ; } stmt = null; } if (conn != null) { try { conn.close(); } catch (SQLException e) { ; } conn = null; } }

    Read the article

  • PHP OCI8 and Oracle 11g DRCP Connection Pooling in Pictures

    - by christopher.jones
    Here is a screen shot from a PHP OCI8 connection pooling demo that I like to run. It graphically shows how little database host memory is needed when using DRCP connection pooling with Oracle Database 11g. Migrating to DRCP can be as simple as starting the pool and changing the connection string in your PHP application. The script that generated the data for this graph was a simple "Parts" query application being run under various simulated user loads. I was running the database on a small Oracle Linux server with just 2G of memory. I used PHP OCI8 1.4. Apache is in pre-fork mode, as needed for PHP. Each graph has time on the horizontal access in arbitrary 'tick' time units. Click the image to see it full sized. Pooled connections Beginning with the top left graph, At tick time 65 I used Apache's 'ab' tool to start 100 concurrent 'users' running the application. These users connected to the database using DRCP: $c = oci_pconnect('phpdemo', 'welcome', 'myhost/orcl:pooled'); A second hundred DRCP users were added to the system at tick 80 and a final hundred users added at tick 100. At about tick 110 I stopped the test and restarted Apache. This closed all the connections. The bottom left graph shows the number of statements being executed by the database per second, with some spikes for background database activity and some variability for this small test. Each extra batch of users adds another 'step' of load to the system. Looking at the top right Server Process graph shows the database server processes doing the query work for each web user. As user load is added, the DRCP server pool increases (in green). The pool is initially at its default size 4 and quickly ramps up to about (I'm guessing) 35. At tick time 100 the pool increases to my configured maximum of 40 processes. Those 40 processes are doing the query work for all 300 web users. When I stopped the test at tick 110, the pooled processes remained open waiting for more users to connect. If I had left the test quiet for the DRCP 'inactivity_timeout' period (300 seconds by default), the pool would have shrunk back to 4 processes. Looking at the bottom right, you can see the amount of memory being consumed by the database. During the initial quiet period about 500M of memory was in use. The absolute number is just an indication of my particular DB configuration. As the number of pooled processes increases, each process needs more memory. You can see the shape of the memory graph echoes the Server Process graph above it. Each of the 300 web users will also need a few kilobytes but this is almost too small to see on the graph. Non-pooled connections Compare the DRCP case with using 'dedicated server' processes. At tick 140 I started 100 web users who did not use pooled connections: $c = oci_pconnect('phpdemo', 'welcome', 'myhost/orcl'); This connection string change is the only difference between the two tests. At ticks 155 and 165 I started two more batches of 100 simulated users each. At about tick 195 I stopped the user load but left Apache running. Apache then gradually returned to its quiescent state, killing idle httpd processes and producing the downward slope at the right of the graphs as the persistent database connection in each Apache process was closed. The Executions per Second graph on the bottom left shows the same step increases as for the earlier DRCP case. The database is handling this load. But look at the number of Server processes on the top right graph. There is now a one-to-one correspondence between Apache/PHP processes and DB server processes. Each PHP processes has one DB server processes dedicated to it. Hence the term 'dedicated server'. The memory required on the database is proportional to all those database server processes started. Almost all my system's memory was consumed. I doubt it would have coped with any more user load. Summary Oracle Database 11g DRCP connection pooling significantly reduces database host memory requirements allow more system memory to be allocated for the SGA and allowing the system to scale to handled thousands of concurrent PHP users. Even for small systems, using DRCP allows more web users to be active. More information about PHP and DRCP can be found in the PHP Scalability and High Availability chapter of The Underground PHP and Oracle Manual.

    Read the article

  • Connection Timeout and Connection Lifetime

    - by Mark
    What is the advantage and disadvantage of connection timeout=0? And what is the use of Connection Lifetime=0? e.g (Database=TestDB;port=3306;Uid=usernameID;Pwd=myPassword;Server=192.168.10.1;Pooling=false;Connection Lifetime=0;Connection Timeout=0) and what is the use of Connection Pooling?

    Read the article

  • Sharing Internet Connection using an ad-hoc wifi network

    - by Apps
    I've installed a WiFi Adapter in my Windows XP PC and created an ad-hoc network. I am able to connect to the network through my iPod Touch. On the same PC I have a LAN connection to the Internet. I need to share this internet connection to my iPod too. The problem is Windows did not assign an IP Address (even though assign IP address automatically is selected) to this WiFi network. When I tried to share the Internet connection, I got a message that LAN Network Adapter's IP address will be changed to 192.168.1.1. But if this happens I will not be able to connect to other devices/servers in my LAN Network. How do I share the Internet connection through WiFi?

    Read the article

  • Internet connection slower than network connection speed

    - by Mike Pateras
    I've got a computer connected to a wireless router on a different floor. When I look at the network connection, I'm told the signal strength is low, and that I've got a connection of about 26mbps (often higher). However, my internet connection on that machine is very slow. Speedtests show it at about 1-2mbps, and it really shows when loading pages and video. I have fiber optic internet access, and the machine that's connected to the router/modem via cable gets the 20mbps on speed tests, and is extremely fast in every day use. My question is, is the advertised 26mbps+ connection speed perhaps inaccurate, and that my wireless bandwidth is the likely bottleneck here? Or is the signal strength what's key here? And what might I do about this? Power cycling the router helped a bit, a speed test went as high as 6mbps after doing that.

    Read the article

  • Failed pinging a LAN card of the server from the client using shared internet connection

    - by bobo
    The server (Windows XP Pro SP3) has two LAN cards (LAN card A and B) and is connected to the internet using ADSL. The ADSL connection is shared to LAN card B using Internet Connection Sharing. The client (Windows XP Pro SP3) has one LAN card, and is connected to LAN card B of the server so that it has access to the internet. The IP address on the LAN cards are defined as follows: Server: LAN card A: 192.168.0.3/24 (manually defined by me) LAN card B: 192.168.0.1/24 (manually defined by Internet Connection Sharing) Client: LAN card: 192.168.0.123/24 (assigned by DHCP) Default gateway: 192.168.0.1 From the server, I can ping 192.168.0.123 successfully. From the client, it can access the internet without any problem. I can also ping 192.168.0.1 successfully but for 192.168.0.3, it failed with the Request Timeout error message. Why did the ping fail, and what should be done to make the ping possible? (all firewalls have been turned off.)

    Read the article

  • Using a Mac to share a VPN connection

    - by Luis Novo
    I am using an iMac to share a wired network connection with other devices in my house. I am using Apple's built-in sharing functionality which works very well. I have also been using Tunnelblick as an OpenVPN client. The two technologies work great when they are not used together. The moment I connect to my VPN, sharing stops working on all other devices; the whole point of this setup was for me to share my VPN connection. Is there a way to make Internet connection sharing and OpenVPN work together on the Mac? I am using Snow Leopard.

    Read the article

  • Router slowing my connection?

    - by Roberto
    I have a Linksys WRT54G and I pay for a 12Mbps connection. I've been testing my connection using speedtest.net for many days and always get 8Mbps. I called the support and they told me to bypass the router and test. I did it and got 16Mbps (much more than I pay for), so I thought "this guy just changed my speed so can he blame my router", and he blamed it. But to my surprise, everytime I bypass the router I get 16Mbps and when I use the router I get 8Mbps. Is this guy trolling me somehow (configuring the VOIP-modem-stuff to different profiles depending o the MAC address connecting to it) or is my router a POS? How can I find out? I don't know what's the thing the router connects to, it's a kind of VOIP adapter; the link is this one, but unfortunately I don't think you'll understand because it's in Portuguese. I know they can remotely connect to it, that's the origin of my conspiracy theory :) I just tested wired to the router and got 10Mbps (and still 8Mbps on wifi and 16Mbps without router) O_o I'm 5cm away from my router, so no obstacles to interfere, right? ------ UPDATE ------- It's a WRT54G V8, I'm using firmware v8.00.7 (will install 8.00.8 tomorrow, but I saw that it's only a minor fix to UPnP denial of service security vulnerability). Results: IPerf LAN-LAN: 80Mbps IPerf LAN-WLAN: 19Mbps (therefore we can ignore wireless issues/settings) I wasn't able to make the (W)LAN-WAN NAT-enabled test with IPerf, I get a connection refused error. I'm not sure if did it right: ran in server mode, configured router to forward that port to my IP and tried to connect to my internet IP that got from this site. I don't think there is a way to disable NAT using this firmware. Question: Let's suppose it's an underpowered hardware issue. Is it right to assume that custom firmwares could resolve the issue because they are possibly better implemented and would make better use of the router resources? I couldn't find any references pointing to wired performance improvements with the use of custom firmware.

    Read the article

  • Connection to SQL Server 2008 R2 Database Server is SLOW

    - by AbeP
    The database server is a VM running SQL Server 2008 R2 on top of Windows Server 2012, 24GB RAM allocated and 2TB of disk space. Overall, the database connections are very slow and one thing that stands out is that the connection to the database server via SSMS takes 5-10 seconds. On other much less powerful servers, it takes 1-2 seconds. The VM is technically way more powerful than other machines, but the connection to the server is too slow. So, my guess is the issue is network related, but any clues on where I should be looking? Thanks!

    Read the article

  • Extremely slow internet-connection?

    - by Martti Laine
    Hello Few days ago I opened my computer as I always do after school, and got pretty amazed about my 1.27kb/s download-speed. It has continued for few days already. We have a wireless network, which is used by 3 computers. Normally I've gotten 200kb/s (I think we have a 2mb-connection) but now it just suddenly slowed down. My friends have the same service-provider, but no problem. So, is there any kind of program, which would show me all the programs using connection and how much. It must be a program open which just takes all speed off. Any help is appreciated, Martti Laine

    Read the article

  • mysql connection is slow (5seconds)

    - by acidzombie24
    After building my webapp on a first boot i create 2 connections to mysql on debian then 1-2 (r/w) for every page after that. The connection consistently take 5.2 seconds to connect. Debian is in a VM running in my OS. Why is the connection taking this long? At times it will take < 0.1 seconds which is great but 5.2 x2-3 on every run is to much. Has anyone experience this problem? how do i solve it? note: I am using .NET to connect. Not that it matters. and its mysql v5

    Read the article

  • MYOB odbc connection problem

    - by Inam Jameel
    Hi guys, i recently got a prebuild application which uses MYOB odbc connection to myob file. the odbc connection works perfectly in that application i uses the same odbc connection string in other application but it failed to open in that application. the connection string is perfectly identical but it wont works the new application. Server explorer in the visual studio 2008 connects as well with the same connection string. is it a trusted application issue? because my new application is digitally signed at the moment OdbcConnection odbc = new OdbcConnection("Driver=MYOAU0901;TYPE=MYOB; UID=Administrator; PWD=; DATABASE=C:\\Premier125\\Clearwtr.MYO; NETWORK_PROTOCOL=NONET; DRIVER_COMPLETION=DRIVER_NOPROMPT;;KEY=****"); odbc.Open(); the key used in the connection string is also valid for sure kindly help me i have to deliver a prototype in 2 days the same connection string is works in one application but not in other application whats the problem?

    Read the article

  • Internet Connection not working - USB LAN connection - from particular modem

    - by Paul
    I am trying to fix Internet connection on a friends Dell inspiron 1720 with XP service pack 3. It has an integrated network card that stopped working, after powering down/up the modem still didnt work I brought it back to my place to try a few things ie check cable, update driver etc... still didnt work. So I bought a USB LAN connector. It didnt work straight away but I went to configure the properties and changed the ConnectionType from AutoSense to 100 BaseT 10BaseT Full_Duplex, I basically just tried them all. From my place when connected to my desktop - 10 BaseT and 10BaseT Full_Duplex worked. From my place When connected to their laptop - 10 BaseT and 10BaseT Full_Duplex worked. Happy I went back to my friends house confident it would all work, and it didnt. Brought it back to mine and it did. While there, in Network Connections the connection is there recognized, enabled, 'working properly' it just says not connected. Also there is no led on the USB connector While at mine as above except there is an led on the USB connector and it says connected. Other difference I can think of is they have a cable modem, I'm plugged into the back of a Belkin wireless router - would this make a difference? Any other ideas what to try? (Would getting the model of the cable modem help anyone?) The USB connector is "DM9601 USB to Fast Ethernet"

    Read the article

  • Internet Connection Sharing/FTP issues

    - by SirSkidmore
    I am currently using a Linux Mint desktop along with a Windows 8 netbook running Internet Connection Sharing to my desktop. On my desktop, I can't access FTP sites, but my laptop can, so I think it might be a porting issue. I can ping the server from Mint, so I know it's up and running, but I can't access it via telnet. On my Windows 8 netbook, I have every protocol checked, including FTP. Originally, the FTP server indicated that "Scotty" (my netbook) was hosting the service, so I tried inputting the IP of my router, 192.168.1.1 to no avail. Any ideas?

    Read the article

  • Ubuntu 12.04 no network connection

    - by user115711
    I own a HP probook 4530s. I installed ubuntu 12.04 along side my windows 7 professional OS. While in window 7 everything works properly in terms of wire and wireless connection. On Ubuntu 12.04 my wired connection doesn't work at all and wireless connection works only when I check off enable wireless then recheck enable wireless. When I recheck enable wireless, the wireless connection only works for about 30 seconds then it goes offline again.

    Read the article

  • Can't connect VPN/add new VPN connection on 12.04 when using NX

    - by dbotamous
    I remote control my Ubuntu box using NX. I am trying to create a new VPN connection. I click on Configure VPN ? Add ? OpenVPN ? Create then I get a "Editing VPN connection 1" window but everything is grayed out, and I can't edit it. The only button I can click is Cancel. The reason I bring up NX is because if I plug in a monitor keyboard and mouse, I can create, edit import VPN connections just fine. So I imported all the different VPN connections, everything was fine. I then remoted back into the Ubuntu machine with NX, click on my VPN connection, and get VPN Connection Failed - The VPN CONNECTION failed to start. Not authorized to control networking. I then disconnected and reconnected NX, and now all the VPN connections I had imported are gone. Any ideas?

    Read the article

  • Internet connection is very slow

    - by ThanujJA
    I use GSM onnection to surfe internet. Before I move to ubuntu I used windows 7 OS. It gives me good speed with GSM connection (100 kbps) But now ubuntu gives me very slow speed.(2-3 kbps) Now it make difficult to use GSM connection. In my country (Sri Lanka) mobile brodbrand servises are very expensive so I cant move to onother one. If I use GSM connection they gives me free data (Airtel connection) So it is most valuable reason for me to use GSM connection. Please anybody help me to speed up my network. Thanx

    Read the article

  • Specification of Extended Properties in OleDb connection string?

    - by Monty
    At the moment I'm searching for properties for a connection string, which can be used to connect to an Excel file in readonly mode. Searching Google gets me a lot of examples of connection strings, but I can't seem to find a specification of all possibilities in the 'Extended Properties' section of the OleDb connection string. At the moment I've this: Provider = Microsoft.Jet.OLEDB.4.0; Data Source = D:\Data\Customers.xls; Extended Properties = 'Excel 8.0; Mode=Read; ReadOnly=true; HDR=Yes'; However... I've composed this by examples. So questions: 1. What is a decent source for OleDb Connection String documentation/reference? 2. Is the above connection string indeed connecting to the Excel file in readonly mode? Thanks!

    Read the article

  • Sybase ODBC connection String with .net

    - by nitinkhanna
    Hi, I am having SYBASE 12.5 install on my server as well as my PC, I am unable to get the correct connection string. I have used the connectionstrings.com but unable to get the correct one. After runnig and making the connection Driver={Sybase ASE ODBC Driver};srvr=server_name;database=database_name;UID=user_name;PWD=pass; and some other combination of thic connection string I am getting the Datasource ="" Driver ="" DataBase="" ServerVersion = Invalid Operation. Connection is closed What am I suppose to correct in that. Please help. Thanks

    Read the article

  • Wired connection stops working suddenly

    - by user90950
    I have Ubuntu 12.04.I was downloading something via aria..and then it suddenly stopped..no connection to Internet. I tried to ping the host but no reply..also tried to ping the route 192.168.250.1 but no reply got a message saying 'Ubuntu 12.04 has experienced internal error'. I restarted system but nothing is sorted out. The wired connection 'establishes' but I am not able to use Internet or ping either to host/route/8.8.8.8. The wireless is working fine and it does connect to Internet. I have a static IP address for wired connection and it does connect to Internet on Windows OS installed on this same Laptop with same IP settings.. please suggest how do i get my wired connection start working properly again..

    Read the article

  • Cable connection takes a lot to establish

    - by user162237
    I've just installed Xubuntu on my computer. It's all OK, but I have a problem with the internet connection: when I boot the PC and I login into Xubuntu it says to me "Cable connection disconnected" or "No cable connection". After a while (like 40 seconds) it connects to the internet and then I'm able to surf the net. I was wondering: why it takes so long to establish a connection? I had no problems of this kind on Windows or other distributions. EDIT: here are some outputs: http://pastebin.com/8nWFC5BV

    Read the article

  • Scope of Connection Object for a Website using Connection Pooling (Local or Instance)

    - by Danny
    For a web application with connection polling enabled, is it better to work with a locally scoped connection object or instance scoped connection object. I know there is probably not a big performance improvement between the two (because of the pooling) but would you say that one follows a better pattern than the other. Thanks ;) public class MyServlet extends HttpServlet { DataSource ds; public void init() throws ServletException { ds = (DataSource) getServletContext().getAttribute("DBCPool"); } protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException { SomeWork("SELECT * FROM A"); SomeWork("SELECT * FROM B"); } void SomeWork(String sql) { Connection conn = null; try { conn = ds.getConnection(); // execute some sql ..... } finally { if(conn != null) { conn.close(); // return to pool } } } } Or public class MyServlet extends HttpServlet { DataSource ds; Connection conn;* public void init() throws ServletException { ds = (DataSource) getServletContext().getAttribute("DBCPool"); } protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException { try { conn = ds.getConnection(); SomeWork("SELECT * FROM A"); SomeWork("SELECT * FROM B"); } finally { if(conn != null) { conn.close(); // return to pool } } } void SomeWork(String sql) { // execute some sql ..... } }

    Read the article

  • Wired Network not working on Ubuntu 11.10 + Strange Behavior with Manual Conf

    - by Mauricio Cruz
    I'm new to Ubuntu - to be honest this is my very first day trying it... and I've already spent hours trying to make my wired connection work. I've been using this wired network with Windows and OSX, and in both systems I also had some trouble trying to connect in the past (and the troubleshooters did their magic and helped me get connected). Today, this is what I got: I'm running Ubuntu 11.10; ifconfig: eth0 Link encap:Ethernet HWaddr 78:2b:cb:c3:bf:8f UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:1 errors:0 dropped:0 overruns:0 frame:0 TX packets:343 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:70 (70.0 B) TX bytes:63273 (63.2 KB) Interrupt:20 Memory:e2e00000-e2e20000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1859 errors:0 dropped:0 overruns:0 frame:0 TX packets:1859 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:149368 (149.3 KB) TX bytes:149368 (149.3 KB) wlan0 Link encap:Ethernet HWaddr 10:0b:a9:82:55:c0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:15484 errors:0 dropped:0 overruns:0 frame:0 TX packets:16871 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:12048377 (12.0 MB) TX bytes:2677679 (2.6 MB) I also have some information from Windows ipconfig /all that I ran at my friend's machine Ipv6 Address: <address> preferential Ipv4 Address: 172.26.65.23 <preferential> Netmask: 255.255.254.0 Default Gateway: 172.26.64.1 DHCP Server : <address> DNS Servers : <address> DNS Suffix : <suffix> The weird thing is that I've tried to configure everything manually, using "Network Connections". When I add everything inside IPv4 Settings, the connection is finally successful, but only for 4~5 seconds before getting disconnected again... Update:I just changed the Connection Method to "Local-Link Only", and the same described above happens: At first, it says "Connection Stablished", but after a few seconds, the wired network gets disconnected. I hope someone can help me get connected! Thanks!

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >