Skip to content

Commit

Permalink
add setting for max connection on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ocean committed Dec 16, 2024
1 parent f2cfda6 commit f9a5c03
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ jobs:
ALLOWED_ADMINS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"]'
DB_TYPE: 'elasticsearch'
MAX_REQ_PER_MINUTE: 320
MAX_CONNECTIONS_PER_MINUTE: 320
- name: Check Ocean Node is running
run: |
for i in $(seq 1 90); do
Expand Down
5 changes: 0 additions & 5 deletions src/components/httpRoutes/requestValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ export function checkConnectionsRateLimit(
const connectionLimits =
configuration.maxConnections || DEFAULT_MAX_CONNECTIONS_PER_MINUTE
const ok = connectionsData.numRequests <= connectionLimits
if (!ok) {
console.log(
`Connection limit exceeded ${connectionsData.numRequests} limit: ${connectionLimits}`
)
}
return {
valid: ok,
error: ok ? '' : 'Unauthorized request. Rate limit exceeded!'
Expand Down

0 comments on commit f9a5c03

Please sign in to comment.