Commit 37cb14ef authored by Michael Terry's avatar Michael Terry

monitor: limit memory usage of deja-dup-monitor

We've had reports of deja-dup-monitor taking all the system memory.
But I haven't been able to reproduce. In an attempt to prevent the
monitor from dragging down the system, set a limit on memory use
by the autostart monitor process using ulimit.

This needs continued watching to see if we can fix this for real.
And to make sure we haven't made anything worse with this
workaround.

(Also in this commit, we rename the file and move it in-source.)

https://launchpad.net/bugs/1302416
parent 8d98914c
......@@ -38,6 +38,16 @@ configure_file(input: 'org.gnome.DejaDup.service.in',
configuration: conf_data,
install_dir: join_paths(datadir, 'dbus-1', 'services'))
conf_data = configuration_data()
conf_data.set('pkglibexecdir', pkglibexecdir)
configure_file(input: 'org.gnome.DejaDup.Monitor.desktop.in',
output: 'org.gnome.DejaDup.Monitor.desktop',
configuration: conf_data,
install_dir: join_paths(etcdir, 'xdg', 'autostart'))
test('validate-org.gnome.DejaDup.Monitor.desktop', desktop_file_validate,
args: ['org.gnome.DejaDup.Monitor.desktop'])
deja_dup_desktop = custom_target('org.gnome.DejaDup.desktop',
input: 'org.gnome.DejaDup.desktop',
output: 'org.gnome.DejaDup.desktop',
......@@ -67,7 +77,7 @@ test('validate-appstream', appstream_util,
conf_data = configuration_data()
conf_data.set('pkglibexecdir', pkglibexecdir)
vars = configure_file(input: 'org.gnome.DejaDup.policy.in',
configure_file(input: 'org.gnome.DejaDup.policy.in',
output: 'org.gnome.DejaDup.policy',
configuration: conf_data,
install_dir: join_paths(datadir, 'polkit-1', 'actions'))
......
......@@ -5,9 +5,14 @@ Name=Backup Monitor
Comment=Schedules backups at regular intervals
Icon=org.gnome.DejaDup
Exec=@pkglibexecdir@/deja-dup-monitor
# Try to limit memory -- we have reports of runaway deja-dup-monitor processes
# but I can't reproduce it. So until we fix whatever is happening there, try
# this. LP: #1302416
Exec=bash -c "ulimit -v 1000000; @pkglibexecdir@/deja-dup-monitor"
X-GNOME-Autostart-Delay=120
X-GNOME-AutoRestart=true
StartupNotify=false
NoDisplay=true
......
......@@ -25,19 +25,3 @@ executable('deja-dup-monitor', ['monitor.vala'],
install: true,
install_rpath: pkglibdir,
install_dir: pkglibexecdir)
conf_data = configuration_data()
conf_data.set('pkglibexecdir', pkglibexecdir)
vars = configure_file(input: 'deja-dup-monitor.desktop.in',
output: 'deja-dup-monitor.desktop.vars',
configuration: conf_data)
monitor_desktop = custom_target('deja-dup-monitor.desktop',
input: vars,
output: 'deja-dup-monitor.desktop',
# List keywords due to https://savannah.gnu.org/support/?108887
command: [msgfmt, '--desktop', '--keyword=Name', '--keyword=Comment', '--template', '@INPUT@', '-d', podir, '-o', '@OUTPUT@'],
install: true,
install_dir: join_paths(etcdir, 'xdg', 'autostart'))
test('validate-deja-dup-monitor.desktop', desktop_file_validate,
args: [monitor_desktop.full_path()])
......@@ -34,12 +34,13 @@ podir = join_paths(meson.current_source_dir(), 'po')
vapidir = join_paths(meson.current_source_dir(), 'vapi')
# Install paths
bindir = join_paths(get_option('prefix'), get_option('bindir'))
datadir = join_paths(get_option('prefix'), get_option('datadir'))
prefix = get_option('prefix')
bindir = join_paths(prefix, get_option('bindir'))
datadir = join_paths(prefix, get_option('datadir'))
etcdir = get_option('sysconfdir')
libdir = join_paths(get_option('prefix'), get_option('libdir'))
libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
localedir = join_paths(get_option('prefix'), get_option('localedir'))
libdir = join_paths(prefix, get_option('libdir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
localedir = join_paths(prefix, get_option('localedir'))
pkgdatadir = join_paths(datadir, meson.project_name())
pkglibdir = join_paths(libdir, meson.project_name())
pkglibexecdir = join_paths(libexecdir, meson.project_name())
......
......@@ -2,7 +2,6 @@ data/org.gnome.DejaDup.appdata.xml.in
data/org.gnome.DejaDup.desktop
data/org.gnome.DejaDup.gschema.xml
data/org.gnome.DejaDup.policy.in
deja-dup/monitor/deja-dup-monitor.desktop.in
deja-dup/ui/help-overlay.ui
deja-dup/ui/menus.ui
deja-dup/ui/restore-missing.ui
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment