Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: Log requests using high amount of memory as warning #48738

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Oct 16, 2024

Should help us finding candidates to optimize more easily.

@juliusknorr juliusknorr requested review from nickvergessen, a team, icewind1991, skjnldsv and yemkareems and removed request for a team October 16, 2024 16:12
@juliusknorr juliusknorr added this to the Nextcloud 31 milestone Oct 16, 2024
lib/base.php Outdated Show resolved Hide resolved
lib/base.php Outdated Show resolved Hide resolved
@blizzz blizzz mentioned this pull request Jan 8, 2025
This was referenced Jan 14, 2025
This was referenced Jan 21, 2025
@AndyScherzinger AndyScherzinger force-pushed the perf/log-high-memory-requests branch from 6a88895 to 8aa28ec Compare January 26, 2025 12:05
@blizzz blizzz mentioned this pull request Jan 29, 2025
1 task
@blizzz blizzz modified the milestones: Nextcloud 31, Nextcloud 32 Jan 29, 2025
@AndyScherzinger AndyScherzinger force-pushed the perf/log-high-memory-requests branch from 8aa28ec to 75bf7d5 Compare February 12, 2025 21:05
@juliusknorr
Copy link
Member Author

Let me address the comment

@juliusknorr juliusknorr force-pushed the perf/log-high-memory-requests branch from 75bf7d5 to 19d8fa7 Compare February 12, 2025 21:14
@juliusknorr juliusknorr requested a review from solracsf February 12, 2025 21:14
lib/base.php Outdated
};
if ($logLevel !== null) {
$message = 'Request used more than 300 MB of RAM: ' . Util::humanFileSize($memoryPeak);
$logger = \OCP\Server::get(LoggerInterface::class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$logger = \OCP\Server::get(LoggerInterface::class);
$logger = Server::get(LoggerInterface::class);

lib/base.php Outdated
Comment on lines 836 to 838
$memoryPeak > 500_000_000 => \OCP\ILogger::FATAL,
$memoryPeak > 400_000_000 => \OCP\ILogger::ERROR,
$memoryPeak > 300_000_000 => \OCP\ILogger::WARN,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$memoryPeak > 500_000_000 => \OCP\ILogger::FATAL,
$memoryPeak > 400_000_000 => \OCP\ILogger::ERROR,
$memoryPeak > 300_000_000 => \OCP\ILogger::WARN,
$memoryPeak > 500_000_000 => ILogger::FATAL,
$memoryPeak > 400_000_000 => ILogger::ERROR,
$memoryPeak > 300_000_000 => ILogger::WARN,

@juliusknorr juliusknorr force-pushed the perf/log-high-memory-requests branch from 19d8fa7 to d31bc88 Compare February 13, 2025 12:43
@juliusknorr juliusknorr merged commit 8c69bf1 into master Feb 13, 2025
189 checks passed
@juliusknorr juliusknorr deleted the perf/log-high-memory-requests branch February 13, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants