gustavobini opened a new issue, #7354:
URL: https://github.com/apache/incubator-devlake/issues/7354

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   I have a Devlake project with a Jenkins connection configured with 91 data 
scopes.
   
   <img width="309" alt="image" 
src="https://github.com/apache/incubator-devlake/assets/6403728/e251e4ed-12cb-4aa1-bc9b-29460659c2d9";>
   
   When I click on **Edit Data Scope and Scope Config**, navigating to 
https://<host>/projects/<project>/<connection_id>, the page never stops showing 
the loading screen.
   
   <img width="309" alt="image" 
src="https://github.com/apache/incubator-devlake/assets/6403728/303c9be5-206d-4afb-a246-52f9d2f993b7";>
   
   Upon inspecting the network requests, the page sends a total of 95 requests 
at once. The response times are from a couple of milliseconds to a minute 
(timed out by the load balancer). Most of the requests fail with a 500 status 
code.
   
   On the API logs, there are several connection errors to the database.
   
   ```
   time="2024-04-19 10:31:24" level=info 
msg="\x1b[31;1m/app/impls/dalgorm/dalgorm.go:215 \x1b[35;1mfailed to connect to 
`host=localhost user=redacted database=devlake`: dial error (dial tcp 
[::1]:5432: connect: cannot assign requested 
address)\n\x1b[0m\x1b[33m[30169.975ms] \x1b[34;1m[rows:0]\x1b[0m SELECT * FROM 
\"_tool_jenkins_jobs\" WHERE connection_id = '1'  AND full_name = 'redacted'  
ORDER BY \"_tool_jenkins_jobs\".\"connection_id\" LIMIT 1"
   time="2024-04-19 10:31:24" level=error msg="HTTP 500 error\n\tcaused by: 
failed to connect to `host=localhost user=redacted database=devlake`: dial 
error (dial tcp [::1]:5432: connect: cannot assign requested address) 
(500)\n\tWraps: (2) failed to connect to `host=localhost user=redacted 
database=devlake`: dial error (dial tcp [::1]:5432: connect: cannot assign 
requested address)\n\tWraps: (3) dial tcp [::1]:5432\n\tWraps: (4) 
connect\n\tWraps: (5) cannot assign requested address\n\tError types: (1) 
*hintdetail.withDetail (2) *pgconn.connectError (3) *net.OpError (4) 
*os.SyscallError (5) syscall.Errno"
   ```
   
   Some notes:
   - The number of database connections is far from the limit
   - There are a lot of free compute resources in both the database and the API
   
   ### What do you expect to happen
   
   I expected the page to load the data.
   
   ### How to reproduce
   
   1. Create a connection
   2. Add at least 90 data scopes to this connection
   3. Create a project
   4. Link the connection to the project
   5. Load the project's page to edit data scope and scope config
   
   ### Anything else
   
   I initially noticed this problem with 
https://github.com/apache/incubator-devlake/releases/tag/v1.0.0-beta5 as I 
wanted to use the Jenkins multi-branch workflows, but even after reverting to 
https://github.com/apache/incubator-devlake/releases/tag/v1.0.0-beta1 the 
problem persists.
   
   ### Version
   
   v1.0.0-beta5
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to