Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Timeout after 4 hours on reporter waiting for data #1242

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

Closed
varianjv opened this issue Aug 26, 2022 · 6 comments · Fixed by #1243
Closed

Timeout after 4 hours on reporter waiting for data #1242

varianjv opened this issue Aug 26, 2022 · 6 comments · Fixed by #1243
Assignees
Labels
Milestone

Comments

@varianjv
Copy link

Describe the bug
java.sql.SQLRecoverableException: Closed Connection
This seems to happen after 4 hours.

Provide version info
Database version 12.2.0.1.0
UT Version v3.1.10.3349

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
PL/SQL Release 12.2.0.1.0 - Production
"CORE 12.2.0.1.0 Production"
TNS for Linux: Version 12.2.0.1.0 - Production
NLSRTL Version 12.2.0.1.0 - Production

NLS_LANGUAGE AMERICAN
NLS_TERRITORY IRELAND
NLS_CURRENCY €
NLS_ISO_CURRENCY IRELAND
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH12:MI:SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT HH12:MI:SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH24:MI:SSXFF TZR
NLS_DUAL_CURRENCY €
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS CHAR
NLS_NCHAR_CONV_EXCP FALSE

x86_64/Linux 2.4.xx

Information about client software
utplsql cli
utPLSQL-cli 3.1.8-SNAPSHOT.local
utPLSQL-java-api 3.1.8.546

To Reproduce
Run the following.
./utplsql run username/password@database:1521/utplsqltestdb -s -t 780 -f=ut_coverage_html_reporter -o=coverage.html

Expected behavior
Expect the reports to be produced.

Additional context
Our database is fairly large, 4.9 million relevant lines.
If I pass a -p parameter to keep it to one subset of tests it runs (approx 3 hours) and generates the coverage report.
However I need a complete report so removed the -P
Seems to always time out after 4 hours.
Running locally on the db server (to avoid any network/firewall timeout) shows the same result.
Nothing in the Oracle alert log/tracefiles, in fact the sql is still running in the database after the disconnect indicating a timeout on the client.

@jgebal
Copy link
Member

jgebal commented Aug 26, 2022

Let me see if there is sone timeout setting that could cause this behavior.

Few questions that coukd help give answer.
If you run the same command but with ut_documentation_reporter, how long does it take to complete?
When running with -p commznd, what do you provide as an argument?

@varianjv
Copy link
Author

-p=schemaname.PACKAGENAME
Works ok as I said, runs in 3 hrs and generates a 770Mb output file.

I will run your suggested command there now and report back ut_documentation_reporter

@varianjv
Copy link
Author

ut_documentation_reporter runs in about 30 minutes (I should have known this as we use this in a jenkins pipeline)

@varianjv
Copy link
Author

@jgebal Any ideas?

@jgebal jgebal added the bug label Jan 16, 2023
@jgebal
Copy link
Member

jgebal commented Jan 16, 2023

This is actually a bug in utPLSQL.

utPLSQL reporters use output-buffer mechanism (table)
For each invoked reporter, the buffer gets populated with data as the main utPLSQL test execution session executed the tests.

When starting a utPLSQl-cli run, the cli starts several sessions for reporters (I think it is one for each reporter + 1 for the main utPLSQL run session).
Each of the reporter sessions is waiting for data to arrive in the buffer table and when it arrives it is instantly consumed (read and deleted) by the reported and data is provided from reporter to an output file.

To prevent situations where a DB may have uncountable amounts of ghost sessions in situations where main session dies or something goes terribly wrong and no data is sent to the reporters, the report consumer session has a timeout of 4 hours.

That timeout is reset each time the reporter session receives some data from the main session.

The problem is, that for coverage, no data is produced until after the test run is finished and coverage data is collected and processed.

I think we need to rewrite the mechanism of synchronization between sessions to be time-independent.

@jgebal
Copy link
Member

jgebal commented Jan 16, 2023

@varianjv - sorry for coming back to this so late.

@jgebal jgebal transferred this issue from utPLSQL/utPLSQL-cli Jan 16, 2023
@jgebal jgebal self-assigned this Jan 16, 2023
@jgebal jgebal changed the title java.sql.SQLRecoverableException: Closed Connection Timeout after 4 hours on reporter waiting for data Jan 16, 2023
@jgebal jgebal added this to the v3.1.14 milestone May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants