This is an archive of the discontinued Mercurial Phabricator instance.

[RFC]hgweb: garbage collect on every request in hgweb_mod too
Needs RevisionPublic

Authored by pulkit on Aug 2 2018, 10:22 AM.

Details

Reviewers
baymax
Group Reviewers
hg-reviewers
Summary

We recently updated to mercurial 4.6.2 on our servers and also increased number
of requests to be made on server at one time. This made hgweb instance takes up
a lot of memory, sometime upto 50GB of memory when requests are made parallely.

This patch is motivated from
https://www.mercurial-scm.org/repo/hg-committed/rev/ff2370a70fe8 which adds
gc.collect() call for the server which serves multiple repositories.

I tried profiling this fix, sometimes this shows less memory usage, sometimes
more, so I am not sure whether this is right and hence RFC tag.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Aug 2 2018, 10:22 AM
pulkit updated this revision to Diff 9792.Aug 2 2018, 11:57 AM
av6 added a subscriber: av6.Aug 2 2018, 1:39 PM

Are you sure you're not just using hgwebdir_mod? hgweb_mod is for cases when you don't use --web-conf flag, at least that seems to be the logic that hgweb.createapp() uses to pick one of the two modules.

In D4053#62855, @av6 wrote:

Are you sure you're not just using hgwebdir_mod? hgweb_mod is for cases when you don't use --web-conf flag, at least that seems to be the logic that hgweb.createapp() uses to pick one of the two modules.

I checked and we are using hgwebdir_mod. When I was testing locally I was not using --web-conf flag, so maybe that's why I ran into hgweb_mod. The problem still exists though and we have limited the number of requests at once. Thanks!

baymax requested changes to this revision.Jan 24 2020, 12:32 PM

There seems to have been no activities on this Diff for the past 3 Months.

By policy, we are automatically moving it out of the need-review state.

Please, move it back to need-review without hesitation if this diff should still be discussed.

:baymax:need-review-idle:

This revision now requires changes to proceed.Jan 24 2020, 12:32 PM