Thread: Connection problem with 8 Beta 5
If this should be directed to another list, please let me know.
First, I want to compliment everyone that has contributed to the development of 8.0. I recently installed Beta 5 (on XP without a hitch) and have been very impressed with its performance and features. I have subscribed to the pgsql-hackers-win32 list since last January and can appreciate the challenges you've overcome in making this happen. Excellent work!
I have run into a problem testing Beta 5 using an existing application on XP.
The application is a VB.NET application that uses PostgreSQL as the backend connecting via psqlodbc. It has been built and runs fine on 7.3.4 via Cygwin on XP and Server 2000.
The testing has been with psqlodbc version 8.00.00.02 that installs with Beta 5.
The application has a number of user input forms that make extensive use of dropdown combo boxes populated from tables in the database (one form has 8 combo boxes, another 15, and another over 20). The boxes are populated via a query sent to the database. A connection is opened to the database, the query executed, the data returned, and the connection closed. This process occurs for each combobox.
When I run the application through the IDE in .NET there are no problems. In fact, the speed of retrieval is remarkably enhanced compared to 7.3.4. A form that used to take 7 seconds plus to load now loads in 2 seconds or less!
First, I want to compliment everyone that has contributed to the development of 8.0. I recently installed Beta 5 (on XP without a hitch) and have been very impressed with its performance and features. I have subscribed to the pgsql-hackers-win32 list since last January and can appreciate the challenges you've overcome in making this happen. Excellent work!
I have run into a problem testing Beta 5 using an existing application on XP.
The application is a VB.NET application that uses PostgreSQL as the backend connecting via psqlodbc. It has been built and runs fine on 7.3.4 via Cygwin on XP and Server 2000.
The testing has been with psqlodbc version 8.00.00.02 that installs with Beta 5.
The application has a number of user input forms that make extensive use of dropdown combo boxes populated from tables in the database (one form has 8 combo boxes, another 15, and another over 20). The boxes are populated via a query sent to the database. A connection is opened to the database, the query executed, the data returned, and the connection closed. This process occurs for each combobox.
When I run the application through the IDE in .NET there are no problems. In fact, the speed of retrieval is remarkably enhanced compared to 7.3.4. A form that used to take 7 seconds plus to load now loads in 2 seconds or less!
However when I run from the .exe version directly I get an inconsistent problem that results in Windows having to shut down the application. The problem occurs when a form is populating the combo boxes while loading. Most times the forms load without problem. At other times I encounter the Microsoft "Test.exe has encountered a problem and needs to close..." dialog box.
All data access processes occur within Try - Catch structures, but they are not trapping this problem.
When this happens the database log shows:
2004-12-20 10:11:12 LOG: could not receive data from client: No connection
could be made because the target machine actively refused it.
2004-12-20 10:11:12 LOG: unexpected EOF on client connection
2004-12-20 10:11:12 LOG: could not receive data from client: No connection
could be made because the target machine actively refused it.
2004-12-20 10:11:12 LOG: unexpected EOF on client connection
2004-12-20 10:11:12 LOG: could not receive data from client: No connection
could be made because the target machine actively refused it.
2004-12-20 10:11:12 LOG: unexpected EOF on client connection
The Windows event log shows two errors for each of the above occurrences:
Event Type: Error
Event Source: Application Error
...
Description:
Faulting application test.exe, version 1.0.1813.27448, faulting module
psqlodbc.dll, version 8.0.0.2, fault address 0x0002001f.
Event Type: Error
Event Source: COM+
...
Description:
The system has called a custom component and that component has failed and
generated an exception. This indicates a problem with the custom component.
Notify the developer of this component that a failure has occurred and
provide them with the information below.
Component Prog ID: 0[ODBC][C:\WINDOWS\System32\psqlodbc.dll]
Method Name: IDispenserDriver::CreateResource
Process Name: test.exe
Exception: C0000005
Address: 0x0366001F
Call Stack:
psqlodbc!SQLGetDiagFieldW + 0x29F
Would this be an issue arising within my application? Is it a psqlodbc bug and should it be directed to the pgsqlodbc project as a bug? The Microsoft event log seems to point at psqlodbc but the database log seems to point at the application. Would there be a reason this is not caught by normal error trapping?
I'm at a loss and would appreciate any guidance you can provide.
George Weaver
When this happens the database log shows:
2004-12-20 10:11:12 LOG: could not receive data from client: No connection
could be made because the target machine actively refused it.
2004-12-20 10:11:12 LOG: unexpected EOF on client connection
2004-12-20 10:11:12 LOG: could not receive data from client: No connection
could be made because the target machine actively refused it.
2004-12-20 10:11:12 LOG: unexpected EOF on client connection
2004-12-20 10:11:12 LOG: could not receive data from client: No connection
could be made because the target machine actively refused it.
2004-12-20 10:11:12 LOG: unexpected EOF on client connection
The Windows event log shows two errors for each of the above occurrences:
Event Type: Error
Event Source: Application Error
...
Description:
Faulting application test.exe, version 1.0.1813.27448, faulting module
psqlodbc.dll, version 8.0.0.2, fault address 0x0002001f.
Event Type: Error
Event Source: COM+
...
Description:
The system has called a custom component and that component has failed and
generated an exception. This indicates a problem with the custom component.
Notify the developer of this component that a failure has occurred and
provide them with the information below.
Component Prog ID: 0[ODBC][C:\WINDOWS\System32\psqlodbc.dll]
Method Name: IDispenserDriver::CreateResource
Process Name: test.exe
Exception: C0000005
Address: 0x0366001F
Call Stack:
psqlodbc!SQLGetDiagFieldW + 0x29F
Would this be an issue arising within my application? Is it a psqlodbc bug and should it be directed to the pgsqlodbc project as a bug? The Microsoft event log seems to point at psqlodbc but the database log seems to point at the application. Would there be a reason this is not caught by normal error trapping?
I'm at a loss and would appreciate any guidance you can provide.
George Weaver
George Weaver <gweaver@shaw.ca> writes: > Faulting application test.exe, version 1.0.1813.27448, faulting module > psqlodbc.dll, version 8.0.0.2, fault address 0x0002001f. Certainly psqlodbc should be the first target of suspicion --- although it's possible this is caused by your code passing bad parameters to psqlodbc. In any case the ODBC guys can help you out better than anyone else. > Would this be an issue arising within my application? Is it a psqlodbc = > bug and should it be directed to the pgsqlodbc project as a bug? The = > Microsoft event log seems to point at psqlodbc but the database log = > seems to point at the application. The database server can't tell the difference between psqlodbc and your application code --- it's all "that stuff at the other end of the TCP connection" to the server. regards, tom lane
Thanks Tom. I'll try the odbc group. The combo boxes are populated from functions that perform a standard query and don't take any parameters, so the calling code is a very simple "Select * from queryfunc()" that returns an id column and a display column. The odbc group could probably advise if I should change something with respect to the connection parameters if that is the issue. George ----- Original Message ----- From: "Tom Lane" <tgl@sss.pgh.pa.us> To: "George Weaver" <gweaver@shaw.ca> Cc: <pgsql-novice@postgresql.org> Sent: Monday, December 20, 2004 12:10 PM Subject: Re: [NOVICE] Connection problem with 8 Beta 5 > George Weaver <gweaver@shaw.ca> writes: >> Faulting application test.exe, version 1.0.1813.27448, faulting module >> psqlodbc.dll, version 8.0.0.2, fault address 0x0002001f. > > Certainly psqlodbc should be the first target of suspicion --- although > it's possible this is caused by your code passing bad parameters to > psqlodbc. In any case the ODBC guys can help you out better than anyone > else. > >> Would this be an issue arising within my application? Is it a psqlodbc = >> bug and should it be directed to the pgsqlodbc project as a bug? The = >> Microsoft event log seems to point at psqlodbc but the database log = >> seems to point at the application. > > The database server can't tell the difference between psqlodbc and your > application code --- it's all "that stuff at the other end of the TCP > connection" to the server. > > regards, tom lane >