René's URL Explorer Experiment


Title: Memory leak · Issue #217 · reactphp/reactphp · GitHub

Open Graph Title: Memory leak · Issue #217 · reactphp/reactphp

X Title: Memory leak · Issue #217 · reactphp/reactphp

Description: Hi, I was playing with the examples and I noticed something weird with https://github.com/reactphp/react/blob/master/examples/test-memory-http.php. I was trying to test how React handles many concurrent connections ( 1k ).

Open Graph Description: Hi, I was playing with the examples and I noticed something weird with https://github.com/reactphp/react/blob/master/examples/test-memory-http.php. I was trying to test how React handles many concu...

X Description: Hi, I was playing with the examples and I noticed something weird with https://github.com/reactphp/react/blob/master/examples/test-memory-http.php. I was trying to test how React handles many concu...

Opengraph URL: https://github.com/reactphp/reactphp/issues/217

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Memory leak","articleBody":"Hi,\nI was playing with the examples and I noticed something weird with `https://github.com/reactphp/react/blob/master/examples/test-memory-http.php`. \nI was trying to test how React handles many concurrent connections ( 1k ).\n\n```\n\u003c?php\nrequire_once \"vendor/autoload.php\";\n\ngc_enable();\nvar_dump(gc_enabled());\n$loop   = new React\\EventLoop\\StreamSelectLoop();\n$socket = new React\\Socket\\Server($loop);\n$http   = new React\\Http\\Server($socket, $loop);\n$i = 0;\n$http->on(\n    'request',\n    function (\\React\\Http\\Request $request, \\React\\Http\\Response $response) use (&$i) {\n        $i++;\n        $response->writeHead();\n        $file = fopen('composer.phar', \"r\");\n\n        $response->write(fread($file, filesize('composer.phar')));\n        fclose($file);\n        $response->end(\"Hello World!\\n\");\n    }\n);\n$loop->addPeriodicTimer(\n    2,\n    function () use (&$i) {\n        var_dump(gc_collect_cycles());\n        $kmem = memory_get_usage(true) / 1024;\n        $mem  = memory_get_usage() / 1024;\n        echo \"Request: $i\\n\";\n        echo \"Memory: $mem KiB\\n\";\n        echo \"Real Memory: $kmem KiB\\n\";\n    }\n);\n\n$socket->listen(1337);\n\n$loop->run();\n```\n\nTesting my server with 1k concurrent connections: `siege localhost:1337 --concurrent=1000` I get the following:\n\n```\nint(759) //gc_collect_cycles\nRequest: 1229\nMemory: 10426.96875 KiB\nReal Memory: 14336 KiB\nint(1081) //gc_collect_cycles\nRequest: 1229\nMemory: 10314.3515625 KiB\nReal Memory: 14080 KiB\nint(0) //gc_collect_cycles\nRequest: 1229\nMemory: 10314.3515625 KiB\nReal Memory: 14336 KiB\n```\n\nEverything is good, but I've noticed that the used memory doesn't drop after ending the siege. I would expect a memory clean up after all the requests are resolved. \n","author":{"url":"https://github.com/unusorin","@type":"Person","name":"unusorin"},"datePublished":"2013-07-29T11:16:28Z","url":"https://github.com/reactphp/reactphp/issues/217"}

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:78499e46-4caa-4bdf-3f89-71af487715a6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE02C:3A347:235976:304A49:6B00C0E5
html-safe-nonceeb4114ea14fbd190224ca57ef80f57a7327bc0d614c9bfb50cfb4527724b4dad
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDJDOjNBMzQ3OjIzNTk3NjozMDRBNDk6NkIwMEMwRTUiLCJ2aXNpdG9yX2lkIjoiNDk5NjYwMDA3MDE2NzExODA1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca895acab8109ccc427c0c5de54a95971601b1d62242aa8c01eefd90b45b2d72c
hovercard-subject-tagissue:17334247
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/reactphp/reactphp/217/issue_layout
twitter:imagehttps://opengraph.githubassets.com/6d0293b93dbd346e9181f6c3b9d7895cc9d60878eb056ff257e8519a9ebe1856/reactphp/reactphp/issues/217
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6d0293b93dbd346e9181f6c3b9d7895cc9d60878eb056ff257e8519a9ebe1856/reactphp/reactphp/issues/217
og:image:altHi, I was playing with the examples and I noticed something weird with https://github.com/reactphp/react/blob/master/examples/test-memory-http.php. I was trying to test how React handles many concu...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameunusorin
hostnamegithub.com
expected-hostnamegithub.com
None93edd3bebc4afb7ce711ee74cb5d2a95927850b082a4d43e212222389cb1c415
turbo-cache-controlno-preview
go-importgithub.com/reactphp/reactphp git https://github.com/reactphp/reactphp.git
octolytics-dimension-user_id1696866
octolytics-dimension-user_loginreactphp
octolytics-dimension-repository_id4287921
octolytics-dimension-repository_nworeactphp/reactphp
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id4287921
octolytics-dimension-repository_network_root_nworeactphp/reactphp
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
release1fee81a280ea86312b69448e261b418189bfd5b5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/reactphp/reactphp/issues/217#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Freactphp%2Freactphp%2Fissues%2F217
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%2Freactphp%2Freactphp%2Fissues%2F217
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=reactphp%2Freactphp
Reloadhttps://github.com/reactphp/reactphp/issues/217
Reloadhttps://github.com/reactphp/reactphp/issues/217
Reloadhttps://github.com/reactphp/reactphp/issues/217
reactphphttps://github.com/reactphp
reactphphttps://github.com/reactphp/reactphp
Codehttps://github.com/reactphp/reactphp
Issueshttps://github.com/reactphp/reactphp/issues
Pull requests5 (5)https://github.com/reactphp/reactphp/pulls
Discussionshttps://github.com/reactphp/reactphp/discussions
Actionshttps://github.com/reactphp/reactphp/actions
Wikihttps://github.com/reactphp/reactphp/wiki
Security and qualityhttps://github.com/reactphp/reactphp/security
Insightshttps://github.com/reactphp/reactphp/insights
https://github.com/reactphp/reactphp
New issuehttps://github.com/login?return_to=https://github.com/reactphp/reactphp/issues/217
New issuehttps://github.com/login?return_to=https://github.com/reactphp/reactphp/issues/217
Memory leakhttps://github.com/reactphp/reactphp/issues/217#top
https://github.com/unusorin
unusorinhttps://github.com/unusorin
on Jul 29, 2013https://github.com/reactphp/reactphp/issues/217#issue-17334247
https://github.com/cboden
cbodenhttps://github.com/cboden
on Jul 29, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-21725342
https://github.com/unusorin
unusorinhttps://github.com/unusorin
on Jul 29, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-21747286
https://github.com/cboden
cbodenhttps://github.com/cboden
on Jul 29, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-21748167
https://github.com/unusorin
unusorinhttps://github.com/unusorin
on Jul 29, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-21749264
https://github.com/unusorin
unusorinhttps://github.com/unusorin
on Jul 30, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-21825110
https://github.com/cboden
cbodenhttps://github.com/cboden
on Aug 1, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-21960979
https://github.com/unusorin
unusorinhttps://github.com/unusorin
on Aug 4, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-22073088
https://github.com/unusorin
unusorinhttps://github.com/unusorin
on Aug 8, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-22310267
@cbodenhttps://github.com/cboden
https://github.com/cboden
cbodenhttps://github.com/cboden
on Aug 8, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-22324117
https://github.com/cboden
cbodenhttps://github.com/cboden
on Aug 11, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-22458896
https://github.com/unusorin
unusorinhttps://github.com/unusorin
on Aug 11, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-22459238
https://github.com/cboden
cbodenhttps://github.com/cboden
on Aug 11, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-22459366
working onhttps://github.com/reactphp/react/pull/213
communication between processeshttps://github.com/reactphp/react/wiki/FAQ#how-do-i-communicate-between-processes
child processhttps://github.com/reactphp/react/pull/162
https://github.com/unusorin
unusorinhttps://github.com/unusorin
on Aug 28, 2013https://github.com/reactphp/reactphp/issues/217#issuecomment-23442017
cbodenhttps://github.com/cboden
completedhttps://github.com/reactphp/reactphp/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Dec 1, 2013https://github.com/reactphp/reactphp/issues/217#event-78933263
Sign up for freehttps://github.com/signup?return_to=https://github.com/reactphp/reactphp/issues/217
Sign in to commenthttps://github.com/login?return_to=https://github.com/reactphp/reactphp/issues/217
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.