CodeQL run is failing everytime due to lost communication with the server #147849
Replies: 2 comments
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Even though you increased memory (-Xmx6144m), the runner might still be running out of resources. Try running Gradle without the daemon to prevent excessive memory usage:
Why?
|
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I am using the below code ql workflow but everytime after 30-40 minutes of running it is giving me below error. I increased the memory size as well but still error is coming.
The hosted runner: GitHub Actions 206 lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.
FAILURE: Build failed with an exception.
What went wrong:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
`jobs:
codeql-analysis:
name: CodeQL Analyse
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
env:
CODEQL_EXTRACTOR_JAVA_AGENT_ENABLE_KOTLIN: true
CODEQL_ACTION_EXTRA_OPTIONS: '{"database": {"finalize": ["-J-Xmx6144m"]}}'
GH_TOKEN: ${{ github.token }}
strategy:
matrix:
os: [ubuntu-latest]
fail-fast: false
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'adopt'
server-id: github
server-username: ${{ github.actor }}
server-password: ${{ secrets.GITHUB_TOKEN }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: 'java'
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
queries: security-extended,security-and-quality
Any suggestions how to resolve the above error?
Beta Was this translation helpful? Give feedback.
All reactions