Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
3cf2fe7d
Commit
3cf2fe7d
authored
Feb 03, 2015
by
Calen Pennington
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6865 from cpennington/add-memory-dump-signal
Add memory dump signal
parents
6ce7f96f
a69c4efd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
3 deletions
+32
-3
cms/wsgi.py
+3
-1
lms/wsgi.py
+3
-1
openedx/core/operations.py
+17
-0
requirements/edx/base.txt
+3
-1
requirements/edx/pre.txt
+6
-0
No files found.
cms/wsgi.py
View file @
3cf2fe7d
...
@@ -6,8 +6,10 @@ defuse_xml_libs()
...
@@ -6,8 +6,10 @@ defuse_xml_libs()
import
contracts
import
contracts
contracts
.
disable_all
()
contracts
.
disable_all
()
import
os
import
openedx.core.operations
openedx
.
core
.
operations
.
install_memory_dumper
()
import
os
os
.
environ
.
setdefault
(
"DJANGO_SETTINGS_MODULE"
,
"cms.envs.aws"
)
os
.
environ
.
setdefault
(
"DJANGO_SETTINGS_MODULE"
,
"cms.envs.aws"
)
import
cms.startup
as
startup
import
cms.startup
as
startup
...
...
lms/wsgi.py
View file @
3cf2fe7d
...
@@ -6,8 +6,10 @@ defuse_xml_libs()
...
@@ -6,8 +6,10 @@ defuse_xml_libs()
import
contracts
import
contracts
contracts
.
disable_all
()
contracts
.
disable_all
()
import
os
import
openedx.core.operations
openedx
.
core
.
operations
.
install_memory_dumper
()
import
os
os
.
environ
.
setdefault
(
"DJANGO_SETTINGS_MODULE"
,
"lms.envs.aws"
)
os
.
environ
.
setdefault
(
"DJANGO_SETTINGS_MODULE"
,
"lms.envs.aws"
)
import
lms.startup
as
startup
import
lms.startup
as
startup
...
...
openedx/core/operations.py
0 → 100644
View file @
3cf2fe7d
import
os
import
signal
import
tempfile
from
datetime
import
datetime
from
meliae
import
scanner
def
dump_memory
(
signum
,
frame
):
"""Dump memory stats for the current process to a temp directory. Uses the meliae output format."""
scanner
.
dump_all_objects
(
'{}/meliae.{}.{}.dump'
.
format
(
tempfile
.
gettempdir
(),
datetime
.
now
()
.
isoformat
(),
os
.
getpid
()))
def
install_memory_dumper
(
dump_signal
=
signal
.
SIGPROF
):
"""
Install a signal handler on `signal` to dump memory stats for the current process.
"""
signal
.
signal
(
dump_signal
,
dump_memory
)
requirements/edx/base.txt
View file @
3cf2fe7d
...
@@ -50,6 +50,9 @@ lazy==1.1
...
@@ -50,6 +50,9 @@ lazy==1.1
lxml==3.3.6
lxml==3.3.6
mako==0.9.1
mako==0.9.1
Markdown==2.2.1
Markdown==2.2.1
--allow-external meliae
--allow-unverified meliae
meliae==0.4.0
mongoengine==0.7.10
mongoengine==0.7.10
networkx==1.7
networkx==1.7
nltk==2.0.4
nltk==2.0.4
...
@@ -58,7 +61,6 @@ oauthlib==0.6.3
...
@@ -58,7 +61,6 @@ oauthlib==0.6.3
paramiko==1.9.0
paramiko==1.9.0
path.py==3.0.1
path.py==3.0.1
Pillow==2.7.0
Pillow==2.7.0
pip>=1.4
polib==1.0.3
polib==1.0.3
pycrypto>=2.6
pycrypto>=2.6
pygments==2.0.1
pygments==2.0.1
...
...
requirements/edx/pre.txt
View file @
3cf2fe7d
...
@@ -7,3 +7,9 @@
...
@@ -7,3 +7,9 @@
# Numpy and scipy can't be installed in the same pip run.
# Numpy and scipy can't be installed in the same pip run.
# Install numpy before other things to help resolve the problem.
# Install numpy before other things to help resolve the problem.
numpy==1.6.2
numpy==1.6.2
# Needed to make sure that options in base.txt are allowed
pip==6.0.7
# Needed for meliae
Cython==0.21.2
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment