Skip to content

Commit fd1ba67

Browse files
authored
ci: set system resource limits for PHP lang tests (#3736)
* ci: set system resource limits for PHP lang tests Recently we had a job fail with: ``` Spawning 87 workers... Warning: stream_socket_accept(): Accept failed: Connection timed out in /usr/local/src/php/run-tests.php on line 1448 ERROR: Failed to accept connection from worker. ``` This is happening because the job doesn't have the right QOS for resource requests to be respected, so it gets a burstable QOS. Sadly, the default is a burstable QOS. So we specifically request resources so that we'll be assigned a guaranteed QOS. * ci: try enforce-static-cpus We're not being auto-assigned the guaranteed QoS, try forcing. * ci: tweak based on latest data now that QoS is enforced
1 parent f1af9ca commit fd1ba67

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

.gitlab/generate-common.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ function windows_git_setup_with_packages() {
156156
DD_POOL_TRACE_CHECK_FAILURES: true
157157
DD_DISABLE_ERROR_RESPONSES: true
158158
SNAPSHOT_REGEX_PLACEHOLDERS: 'path:/\S+/dd-trace-php(?=/),httpbin:(?<=//)httpbin-integration:8080'
159+
KUBERNETES_SERVICE_CPU_REQUEST: 1
160+
KUBERNETES_SERVICE_CPU_LIMIT: 1
161+
KUBERNETES_SERVICE_MEMORY_REQUEST: 512Mi
162+
KUBERNETES_SERVICE_MEMORY_LIMIT: 512Mi
159163

160164
request-replayer:
161165
name: registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:php-request-replayer-2.0

.gitlab/generate-tracer.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,23 @@ function before_script_steps($with_docker_auth = false) {
484484
REPORT_EXIT_STATUS: "1"
485485
TEST_PHP_JUNIT: "${CI_PROJECT_DIR}/artifacts/tests/php-tests.xml"
486486
SKIP_ONLINE_TESTS: "1"
487+
WAIT_FOR: test-agent:9126
488+
<?php if (version_compare($major_minor, "7.4", ">=")): ?>
489+
KUBERNETES_CPU_REQUEST: 8
490+
KUBERNETES_CPU_LIMIT: 8
491+
KUBERNETES_MEMORY_REQUEST: 7Gi
492+
KUBERNETES_MEMORY_LIMIT: 7Gi
493+
<?php else: ?>
494+
KUBERNETES_CPU_REQUEST: 1
495+
KUBERNETES_CPU_LIMIT: 1
496+
KUBERNETES_MEMORY_REQUEST: 4Gi
497+
KUBERNETES_MEMORY_LIMIT: 4Gi
498+
<?php endif; ?>
499+
KUBERNETES_HELPER_CPU_REQUEST: 1
500+
KUBERNETES_HELPER_CPU_LIMIT: 1
501+
KUBERNETES_HELPER_MEMORY_REQUEST: 1Gi
502+
KUBERNETES_HELPER_MEMORY_LIMIT: 1Gi
503+
KUBERNETES_POD_ANNOTATIONS_1: "ci.ddbuild.io/enforce-static-cpus=true"
487504
<?php if (version_compare($major_minor, "7.2", ">=")): /* too expensive */ ?>
488505
DD_INSTRUMENTATION_TELEMETRY_ENABLED: 0
489506
<?php endif; ?>

0 commit comments

Comments
 (0)