René's URL Explorer Experiment


Title: [Bug]: Heartbeat not being updated while user edits files or has terminal activity. · Issue #5969 · coder/code-server · GitHub

Open Graph Title: [Bug]: Heartbeat not being updated while user edits files or has terminal activity. · Issue #5969 · coder/code-server

X Title: [Bug]: Heartbeat not being updated while user edits files or has terminal activity. · Issue #5969 · coder/code-server

Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: chrome, brave Local OS: linux, windows Remote OS: docker running debian (for example php:8.0.6-apache docker image) Remote Architect...

Open Graph Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: chrome, brave Local OS: linux, windows Remote OS: docker running debian (for example php:8.0...

X Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: chrome, brave Local OS: linux, windows Remote OS: docker running debian (for example php:8.0...

Opengraph URL: https://github.com/coder/code-server/issues/5969

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Heartbeat not being updated while user edits files or has terminal activity.","articleBody":"### Is there an existing issue for this?\r\n\r\n- [X] I have searched the existing issues\r\n\r\n### OS/Web Information\r\n\r\n- Web Browser:  chrome, brave\r\n- Local OS:   linux, windows\r\n- Remote OS: docker running debian (for example php:8.0.6-apache docker image)\r\n- Remote Architecture: x86_64 \r\n- `code-server --version`:    v4.8.3  also tested against v4.9.1, and v4.7.3\r\n4.8.3 977b853a1e162ab583aed64b1322d1515c57728c with Code 1.72.1\r\n\r\n### Steps to Reproduce\r\n\r\n1. Run code server and login in a web browser\r\n2. Continuously watch the heartbeat file in seperate window, to see when it was last updated (how old it is)\r\n3. Edit file and generally work in a open terminal window.  Or just go do other things until heartbeat stops.\r\n4. After this do thins with code-server and VERY few times will get heartbeat to start updating again!\r\n\r\n### Expected\r\n\r\nHeartbeat file  `$HOME/.local/share/code-server/heartbeat` should have its time updated (touched) at least once every minute, while there is ANY activity.   Essentially if a browser is connected to it, heartbeat should update.  BUt it stops after a while.\r\n\r\nAlternatively heartbeat could update on any auto-file save, menu activity, or terminal window activity.\r\n\r\n### Actual\r\n\r\nAfter a period of time (could be anywhere from 15 to 45 minutes) the heartbeat stops updating.\r\n\r\nAt which point it will NOT start again even if user starts to edit existing open files, making changes, saving using ctrl-S, closing open file editing, or perform commands in terminal.  Actual changes are being made, and confirmed both in the file system, or even from looking via the code-server terminal, and yet heartbeat does not reflect that the user has performed some action, and as such is NOT idle.\r\n\r\nThe heartbeat only starts updating again, if a new file is opened, or browser tab (google chrome, or brave) is refreshed, or re-opened.  And then only for a VERY short time (up to 5 minutes or so) before it stops again, even though user is active and changes are being made (as above).  Sometimes with only a single heartbeat update being seen.\r\n\r\nThis is BAD as the idle-timeout system we use relies on the heartbeat (see below).  It can't use web requests as there no new requests, as actual changes were made though open connections.  Be it via terminal or file editing.\r\n\r\n### Logs\r\n\r\nNo log output has been seen in any log without verbose turned on.\r\nHowever with the length of times involved the size of the verbose log is HUGE!\r\nEspecially as the 'File Watcher' also watches the file it logs to for the File Watching while verbose!\r\nEG:  .local/share/code-server/logs/.../remoteagent.log\r\n\r\nLooking at around the time the heartbeat stops 2023-01-13_15:14:54\r\nAnd removing any line with the pattern `File Watcher.*share/code-server`\r\nI get the following from `remoteagent.log`...\r\n```\r\n[2023-01-13 15:12:39.157] [remoteagent] [trace] [File Watcher (parcel)] [ADDED] /var/www/20230113-1512-01-\r\n[2023-01-13 15:12:39.158] [remoteagent] [trace] [File Watcher (parcel)] [ADDED] /var/www/20230113-1512-01-/var\r\n[2023-01-13 15:12:39.158] [remoteagent] [trace] [File Watcher (parcel)] [ADDED] /var/www/20230113-1512-01-/var/www\r\n[2023-01-13 15:12:39.158] [remoteagent] [trace] [File Watcher (parcel)] [ADDED] /var/www/20230113-1512-01-/var/www/.local\r\n[2023-01-13 15:12:39.158] [remoteagent] [trace] [File Watcher (parcel)] [ADDED] /var/www/20230113-1512-01-/var/www/.local/share\r\n[2023-01-13 15:12:39.158] [remoteagent] [trace] [File Watcher (parcel)]  >> normalized [ADDED] /var/www/20230113-1512-01-\r\n[2023-01-13 15:12:39.158] [remoteagent] [trace] [File Watcher (parcel)]  >> normalized [ADDED] /var/www/20230113-1512-01-/var\r\n[2023-01-13 15:12:39.158] [remoteagent] [trace] [File Watcher (parcel)]  >> normalized [ADDED] /var/www/20230113-1512-01-/var/www\r\n[2023-01-13 15:12:39.158] [remoteagent] [trace] [File Watcher (parcel)]  >> normalized [ADDED] /var/www/20230113-1512-01-/var/www/.local\r\n[2023-01-13 15:12:39.158] [remoteagent] [trace] [File Watcher (parcel)]  >> normalized [ADDED] /var/www/20230113-1512-01-/var/www/.local/share\r\n[2023-01-13 15:15:00.644] [remoteagent] [trace] ExtensionManagementService.refreshReportedCache\r\n[2023-01-13 15:15:00.644] [remoteagent] [trace] ExtensionManagementService.refreshControlCache {\"malicious\":[],\"deprecated\":{}}\r\n[2023-01-13 15:16:00.640] [remoteagent] [trace] Started scanning user extensions\r\n[2023-01-13 15:16:00.642] [remoteagent] [trace] Scanned user extensions: 0\r\n```\r\n\r\nI seriously doubt this is of any use.\r\n\r\n### Screenshot/Video\r\n\r\n_No response_\r\n\r\n### Are you accessing code-server over HTTPS?\r\n\r\n- [X] I am using HTTPS.\r\n\r\n### Notes\r\n\r\nI have recently had complaints from students and staff saying the Heartbeat has become flaky.\r\nThe heartbeat is used by our docker system to determine when a user is no longer using the development environment they are running so it can be closed down after an hour of non-use.\r\n\r\nI am finding the heartbeat stopped updating, even though files are still being edited or the terminal is being used.  The heartbeat does start to work again if a different file is opened for editing, or the whole browser tab is refreshed.  But not from actual use with files being edited or the terminal being used.  The heart beat file, which normally updates once a minute just stops being updated.\r\n\r\nHeartbeat is VITAL for the determination of the automatic shutdown of docker instances, as code-server holds web connections open, rather than making new requests (as jupyter notebook does).  The Idle checker checks...\r\n1/ user started or checked the status of docker instance from a control panel\r\n2/ there has been any web request logged by the docker ingress service for that user on the code-server port (8443)  or on other ports user may used in their docker environment (apache ports).\r\n3/ the code-server heartbeat file was last updated.\r\n\r\nSystem is basically as originally described in\r\nhttps://github.com/coder/code-server/issues/792#issuecomment-997541980\r\nOnly with the addition of web request checks being added, as per...\r\nhttps://github.com/coder/code-server/issues/1274#issuecomment-1011712084\r\nto the 'idle timeout' check script that runs every ten minutes (it looks back and records in another timestamp file) and user web requests for specific ports in the last 15 minutes of ingress logs.\r\n\r\nThe heartbeat may be related to the refactor of the heartbeat in...\r\nhttps://github.com/coder/code-server/issues/5544","author":{"url":"https://github.com/antofthy","@type":"Person","name":"antofthy"},"datePublished":"2023-01-13T03:54:43Z","url":"https://github.com/coder/code-server/issues/5969"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6a06d500-820b-a3ec-bba7-f54d1780ea19
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCB2C:65478:26808D7:331445B:6B019F30
html-safe-noncee247ee1469f995004893a1ba0d3457789280f2385799ca143631ab94cf7787c4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjJDOjY1NDc4OjI2ODA4RDc6MzMxNDQ1Qjo2QjAxOUYzMCIsInZpc2l0b3JfaWQiOiI5MTYxNjk4MzA1NDM5Mjc2ODQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac278b2d3eb1462b2742804620cc5a69ac0eefae355d2698f7e7e691773b06cef2
hovercard-subject-tagissue:1531670075
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/code-server/5969/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4d25652c43e3055d71952dcf819fa2b24ce8bbb12a01d70a074dfec0d39fbfdd/coder/code-server/issues/5969
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4d25652c43e3055d71952dcf819fa2b24ce8bbb12a01d70a074dfec0d39fbfdd/coder/code-server/issues/5969
og:image:altIs there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: chrome, brave Local OS: linux, windows Remote OS: docker running debian (for example php:8.0...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameantofthy
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/coder/code-server git https://github.com/coder/code-server.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id172953845
octolytics-dimension-repository_nwocoder/code-server
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id172953845
octolytics-dimension-repository_network_root_nwocoder/code-server
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/code-server/issues/5969#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcode-server%2Fissues%2F5969
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcode-server%2Fissues%2F5969
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcode-server
Reloadhttps://github.com/coder/code-server/issues/5969
Reloadhttps://github.com/coder/code-server/issues/5969
Reloadhttps://github.com/coder/code-server/issues/5969
coderhttps://github.com/coder
code-serverhttps://github.com/coder/code-server
Codehttps://github.com/coder/code-server
Issues147 (147)https://github.com/coder/code-server/issues
Pull requests17 (17)https://github.com/coder/code-server/pulls
Discussionshttps://github.com/coder/code-server/discussions
Actionshttps://github.com/coder/code-server/actions
Projectshttps://github.com/coder/code-server/projects
Security and quality3 (3)https://github.com/coder/code-server/security
Insightshttps://github.com/coder/code-server/insights
https://github.com/coder/code-server
New issuehttps://github.com/login?return_to=https://github.com/coder/code-server/issues/5969
New issuehttps://github.com/login?return_to=https://github.com/coder/code-server/issues/5969
#8141https://github.com/coder/code-server/pull/8141
[Bug]: Heartbeat not being updated while user edits files or has terminal activity.https://github.com/coder/code-server/issues/5969#top
#8141https://github.com/coder/code-server/pull/8141
bugSomething isn't workinghttps://github.com/coder/code-server/issues?q=state%3Aopen%20label%3A%22bug%22
January 2022https://github.com/coder/code-server/milestone/47
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on Jan 13, 2023https://github.com/coder/code-server/issues/5969#issue-1531670075
977b853https://github.com/coder/code-server/commit/977b853a1e162ab583aed64b1322d1515c57728c
#792 (comment)https://github.com/coder/code-server/issues/792#issuecomment-997541980
#1274 (comment)https://github.com/coder/code-server/issues/1274#issuecomment-1011712084
#5544https://github.com/coder/code-server/issues/5544
antofthyhttps://github.com/antofthy
bugSomething isn't workinghttps://github.com/coder/code-server/issues?q=state%3Aopen%20label%3A%22bug%22
triageThis issue needs to be triaged by a maintainerhttps://github.com/coder/code-server/issues?q=state%3Aopen%20label%3A%22triage%22
on Jan 13, 2023https://github.com/coder/code-server/issues/5969#event-8217106127
antofthyhttps://github.com/antofthy
on Jan 13, 2023https://github.com/coder/code-server/issues/5969#event-8217319714
https://github.com/jsjoeio
jsjoeiohttps://github.com/jsjoeio
on Jan 13, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1382154430
@code-asherhttps://github.com/code-asher
https://github.com/jsjoeio
jsjoeiohttps://github.com/jsjoeio
on Jan 13, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1382214267
@antofthyhttps://github.com/antofthy
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on Jan 14, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1382632453
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on Jan 14, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1382651329
https://github.com/coder/code-server/tree/v4.9.1https://github.com/coder/code-server/tree/v4.9.1
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on Jan 14, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1382658424
https://user-images.githubusercontent.com/1214656/212450673-dc14fbdc-7d7b-4ef9-ad32-6c49fb565169.png
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on Jan 16, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1383486525
https://user-images.githubusercontent.com/1214656/212600848-9012b556-9189-4d7a-b142-2dc700ffe208.png
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on Jan 16, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1383488322
https://github.com/jsjoeio
jsjoeiohttps://github.com/jsjoeio
on Jan 17, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1385727987
https://github.com/coder/code-server/tree/main/test/unithttps://github.com/coder/code-server/tree/main/test/unit
@code-asherhttps://github.com/code-asher
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on Jan 18, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1386341295
https://github.com/code-asher
code-asherhttps://github.com/code-asher
on Jan 18, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1387473743
@jsjoeiohttps://github.com/jsjoeio
code-server/src/node/routes/index.tshttps://github.com/coder/code-server/blob/134e9b40b7e1de41ac763d871acbaf1307503e0a/src/node/routes/index.ts#L35-L42
134e9b4https://github.com/coder/code-server/commit/134e9b40b7e1de41ac763d871acbaf1307503e0a
https://github.com/jsjoeio
jsjoeiohttps://github.com/jsjoeio
on Jan 18, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1387504514
jsjoeiohttps://github.com/jsjoeio
triageThis issue needs to be triaged by a maintainerhttps://github.com/coder/code-server/issues?q=state%3Aopen%20label%3A%22triage%22
on Jan 18, 2023https://github.com/coder/code-server/issues/5969#event-8258477324
jsjoeiohttps://github.com/jsjoeio
January 2022https://github.com/coder/code-server/milestone/47
on Jan 18, 2023https://github.com/coder/code-server/issues/5969#event-8258477621
https://github.com/code-asher
code-asherhttps://github.com/code-asher
on Feb 8, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1423218009
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on Feb 10, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1425252189
https://github.com/code-asher
code-asherhttps://github.com/code-asher
on Feb 13, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1428508291
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on Feb 20, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1436149920
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on May 8, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1537868455
https://github.com/code-asher
code-asherhttps://github.com/code-asher
on May 8, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1539121611
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on May 31, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1569513368
https://github.com/code-asher
code-asherhttps://github.com/code-asher
on May 31, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1570960875
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on May 31, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1571074345
https://github.com/antofthy
antofthyhttps://github.com/antofthy
on Jun 2, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1573168508
https://github.com/code-asher
code-asherhttps://github.com/code-asher
on Jun 2, 2023https://github.com/coder/code-server/issues/5969#issuecomment-1574246182
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/code-server/issues/5969
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/code-server/issues/5969
bugSomething isn't workinghttps://github.com/coder/code-server/issues?q=state%3Aopen%20label%3A%22bug%22
January 2022https://github.com/coder/code-server/milestone/47
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.