Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application hangs without Exception on Update #4510

Closed
abid76 opened this issue Jun 14, 2022 · 5 comments
Closed

Application hangs without Exception on Update #4510

abid76 opened this issue Jun 14, 2022 · 5 comments

Comments

@abid76
Copy link

abid76 commented Jun 14, 2022

The issue

Since a couple of days the application hangs (about two times per day) when it tries to perform an update statement without any exception.

Here you see the last entry of the application log:

2022-06-13 11:12:13,059 [ 1] DEBUG Betreuung.Util.PerfLog Beginn RepositoryBase`1 -> Save ...

I turned on Npgsql logging, these are the last entries:

2022-06-13 11:12:13,059 [ 1] TRACE Npgsql.NpgsqlConnection Opening connection...
2022-06-13 11:12:13,059 [ 1] TRACE Npgsql.NpgsqlConnection Opening connection...
2022-06-13 11:12:13,059 [ 1] DEBUG Npgsql.NpgsqlConnection Connection opened
2022-06-13 11:12:13,059 [ 1] TRACE Npgsql.NpgsqlConnector Start user action
2022-06-13 11:12:13,059 [ 1] DEBUG Npgsql.NpgsqlCommand Executing statement(s):
	UPDATE aufgabe
SET von_person_id = $1, an_person_id = $2, betrifft_person_id = $3, titel = $4, beschreibung = $5, prioritaet = $6, beginn = $7, faelligkeit = $8, erstellt = $9, erledigt = $10
WHERE id = $11

2022-06-13 11:12:13,059 [ 1] DEBUG Npgsql.NpgsqlConnector Sending cancellation...
2022-06-13 11:12:13,059 [ 1] TRACE Npgsql.NpgsqlConnector Attempting to connect to 192.168.73.150:5432
2022-06-13 11:12:13,075 [ 1] TRACE Npgsql.NpgsqlConnector Socket connected to 192.168.73.150:5432

No exception raises, it simply hangs.

I'm not quite sure how to interpret this. E.g. what means

2022-06-13 11:12:13,059 [ 1] DEBUG Npgsql.NpgsqlConnector Sending cancellation...

Do the log entries give a hint to any underlying problem (e.g. network issues)?

Using Npgsql Version 5 lead to problems in the project's dependency config. May it help to upgrade to 4.1.11?

Further technical details

Npgsql version: 4.0.12
PostgreSQL version: 11.2
Operating system: Windows 10

Other details about my project setup: C# application (.NET 4.6.1) using Dapper.

@roji
Copy link
Member

roji commented Jun 14, 2022

@abid76 I honestly can't help much with version 4.0.12 - that's really ancient. 4.1 may help, but not that it should be possible to use modern versions in .NET Framework if you set up the right binding redirects.

Given that this happens sporadically, I'd wager on some networking issue outside of Npgsql. But the odd thing about the logging above is that there's "Sending cancellation" right after "Executing statement" - is this something your application is doing purposefully?

@abid76
Copy link
Author

abid76 commented Jun 14, 2022

is this something your application is doing purposefully?

No. The application just performs an update without anything else. Nothing special about it.

Please tell me which version you would suggest in terms of stability (must work with PostgreSQL 11.2). Is it Version 5? (Version 6 seemed to me somehow buggy but maybe I made some mistake in my app config).

@abid76
Copy link
Author

abid76 commented Jun 14, 2022

@roji I would be happy to know what "Sending cancellation..." actually means ... is it performing a rollback?

@roji
Copy link
Member

roji commented Jun 14, 2022

Sending cancellation means that an ongoing database command is being cancelled (e.g. NpgsqlCommand.Cancel), it has nothing to do with transaction rollback. Dapper may be the one triggering this, I'm not sure.

@roji
Copy link
Member

roji commented Sep 25, 2022

Closing as no further feedback was provided, but can reopen if needed.

@roji roji closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants