|
List Info
Thread: Help - my plone site is spinning!
|
|
| Help - my plone site is spinning! |
  United States |
2007-03-21 14:21:12 |
Each time I restart zope on my production server, it
instantly consumes 99% of
my cpu cycles. A little research says this is called
"spinning".
I am struggling through the tutorial "Coping with a
Live Spinning Zope" at
http://plone.org/documentation/how-to/cop
ing-with-a-live-spinning-zope. But I
am not a Linux guru.
The suggestion in the tutorial for a bandaid fix (restarting
zope each time it
starts to spin) doesn't work for me because it starts
spinning on restart!
If anyone can provide some other thoughts or suggestions,
they would be
greatly appreciated! Should I upgrade to zope 2.10 or plone
2.5.2?
I am running zope 2.9 and plone 2.5.1 with just one plone
site. I get these
warnings when I start zope:
stingray:/home/mark#
/var/lib/zope2.9/instance/plone-site/bin/runzope
/var/lib/zope2.9/instance/plone-site/Products/Marshall/handl
ers/__init__.py:38:
UserWarning: libxml2 not available. Unable to register
libxml2 based
marshallers
warnings.warn('libxml2 not available. Unable to register
libxml2 based '
/var/lib/zope2.9/instance/plone-site/Products/ATVocabularyMa
nager/__init__.py:8:
DeprecationWarning: The module,
'Products.CMFCore.CMFCorePermissions' is a
deprecated compatiblity alias for
'Products.CMFCore.permissions'; please use
the new module instead.
from Products.CMFCore import CMFCorePermissions
/var/lib/zope2.9/instance/plone-site/Products/GameEvent/__in
it__.py:16:
DeprecationWarning: The zLOG package is deprecated and will
be removed in
Zope 2.11. Use the Python logging module instead.
LOG('GameEvent',INFO, 'Installing Product')
/var/lib/zope2.9/instance/plone-site/Products/GameEvent/__in
it__.py:25:
DeprecationWarning: PloneUtilities is deprecated and will be
removed in Plone
3.0, please import from Products.CMFPlone.utils instead.
from Products.CMFPlone.PloneUtilities import ToolInit
/var/lib/zope2.9/instance/plone-site/Products/PHParser/PHPar
ser.py:49:
DeprecationWarning: Using OFS.content_types is deprecated
(will be removed in
Zope 2.11). Instead use zope.app.contenttypes.
from OFS.content_types import guess_content_type
/var/lib/zope2.9/instance/plone-site/Products/PloneWeather/_
_init__.py:54:
DeprecationWarning: The zLOG package is deprecated and will
be removed in
Zope 2.11. Use the Python logging module instead.
LOG('PloneWeather',INFO, 'Installing Product')
/var/lib/zope2.9/instance/plone-site/Products/ATVocabularyMa
nager/__init__.py:37:
DeprecationWarning: The product_name parameter of ToolInit
is deprecated and
will be ignored in CMF 2.0: ATVocabularyManager
icon='tool.gif'
/var/lib/zope2.9/instance/plone-site/Products/CMFSquidTool/_
_init__.py:38:
DeprecationWarning: The product_name parameter of ToolInit
is deprecated and
will be ignored in CMF 2.0: CMFSquidTool
icon="tool.gif",
/var/lib/zope2.9/instance/plone-site/Products/CacheSetup/con
fig.py:23:
DeprecationWarning: The zLOG package is deprecated and will
be removed in
Zope 2.11. Use the Python logging module instead.
LOG(PROJECT_NAME, INFO, msg)
/var/lib/zope2.9/instance/plone-site/Products/PloneKeywordMa
nager/__init__.py:44:
DeprecationWarning: The product_name parameter of ToolInit
is deprecated and
will be ignored in CMF 2.0: PloneKeywordManager
icon='tool.gif')
{u'icon_url_name': u'skc.jpg', u'heat_index_c': u'NA',
u'image':
u'nttnttnttnt', u'heat_index_f': u'NA',
u'privacy_policy_url':
u'http://weather.gov/not
ice.html', u'weather': u'Fair', u'windchill_c':
u'NA', u'ob_url': u'http://
www.nws.noaa.gov/data/METAR/KLWM.1.txt',
u'windchill_f': u'NA', u'pressure_in': u'30.74',
u'dewpoint_string': u'-1 F
(-18 C)', u'suggested_pickup_period': u'60',
u'disclaimer_url':
u'http://weather.gov
/disclaimer.html', u'credit': u"NOAA's National
Weather
Service", u'dewpoint_f': u'-1', u'location': u'Lawrence
Municipal Airport,
MA', u'dewpoint_c': u'-18', u'latitude': u'42.730', '#text':
'', u'wind_mph':
u'3.45', u'temp_f': u'35', u'station_id': u'KLWM',
u'pressure_string':
u'30.74" (1041.1 mb)', u'windchill_string': u'NA',
u'temp_c': u'2',
u'visibility_mi': u'10.00', u'wind_string': u'Variable at 3
MPH',
u'pressure_mb': u'1041.1', u'temperature_string': u'35 F (2
C)',
u'two_day_history_url': u'http:
//www.weather.gov/data/obhistory/KLWM.html',
u'wind_dir': u'Variable', u'wind_degrees': u'999',
u'copyright_url':
u'http://weather.gov
/disclaimer.html', u'icon_url_base':
u'http://wea
ther.gov/weather/images/fcicons/', u'wind_gust_mph':
u'NA',
u'observation_time': u'Last Updated on Mar 21, 1:54 pm EDT',
u'heat_index_string': u'NA', u'longitude': u'-71.120',
u'credit_URL':
u'http://weather.gov/',
u'suggested_pickup': u'15 minutes after the hour',
u'relative_humidity': u'21', u'observation_time_rfc822':
u'Wed, 21 Mar 2007
13:54:00 -0400 EDT'}
/var/lib/zope2.9/instance/plone-site/Products/PloneWeather/_
_init__.py:96:
DeprecationWarning: The product_name parameter of ToolInit
is deprecated and
will be ignored in CMF 2.0: PloneWeather
icon='tool.gif'
/var/lib/zope2.9/instance/plone-site/Products/kupu/plone/__i
nit__.py:32:
DeprecationWarning: The product_name parameter of ToolInit
is deprecated and
will be ignored in CMF 2.0: kupu
icon="kupu_icon.gif",
/var/lib/zope2.9/instance/plone-site/Products/CMFCore/Direct
oryView.py:57:
DeprecationWarning: expandpath() doesn't belong to
DirectoryView anymore and
will be removed from that module in CMF 2.0. Please import
expandpath from
the utils module.
DeprecationWarning)
Would any of these warnings cause the spinning?
Thanks!
Mark
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: Help - my plone site is spinning! |
  Canada |
2007-03-21 14:34:53 |
Likely it's some add-on product you have installed. I'd try
removing
those and adding them back one or two at a time. It could be
the
combination of add-ons as well.
Brett
-----Original Message-----
From: plone-users-bounces lists.sourceforge.net
[mailto:plone-users-bounces lists.sourceforge.net] On
Behalf Of Mark
Phillips
Sent: March 21, 2007 3:21 PM
To: Plone Users
Subject: [Plone-Users] Help - my plone site is spinning!
Each time I restart zope on my production server, it
instantly consumes
99% of
my cpu cycles. A little research says this is called
"spinning".
I am struggling through the tutorial "Coping with a
Live Spinning Zope"
at
http://plone.org/documentation/how-to/cop
ing-with-a-live-spinning-zope.
But I
am not a Linux guru.
The suggestion in the tutorial for a bandaid fix (restarting
zope each
time it
starts to spin) doesn't work for me because it starts
spinning on
restart!
If anyone can provide some other thoughts or suggestions,
they would be
greatly appreciated! Should I upgrade to zope 2.10 or plone
2.5.2?
I am running zope 2.9 and plone 2.5.1 with just one plone
site. I get
these
warnings when I start zope:
stingray:/home/mark#
/var/lib/zope2.9/instance/plone-site/bin/runzope
/var/lib/zope2.9/instance/plone-site/Products/Marshall/handl
ers/__init__
.py:38:
UserWarning: libxml2 not available. Unable to register
libxml2 based
marshallers
warnings.warn('libxml2 not available. Unable to register
libxml2 based
'
/var/lib/zope2.9/instance/plone-site/Products/ATVocabularyMa
nager/__init
__.py:8:
DeprecationWarning: The module,
'Products.CMFCore.CMFCorePermissions' is
a
deprecated compatiblity alias for
'Products.CMFCore.permissions';
please use
the new module instead.
from Products.CMFCore import CMFCorePermissions
/var/lib/zope2.9/instance/plone-site/Products/GameEvent/__in
it__.py:16:
DeprecationWarning: The zLOG package is deprecated and will
be removed
in
Zope 2.11. Use the Python logging module instead.
LOG('GameEvent',INFO, 'Installing Product')
/var/lib/zope2.9/instance/plone-site/Products/GameEvent/__in
it__.py:25:
DeprecationWarning: PloneUtilities is deprecated and will be
removed in
Plone
3.0, please import from Products.CMFPlone.utils instead.
from Products.CMFPlone.PloneUtilities import ToolInit
/var/lib/zope2.9/instance/plone-site/Products/PHParser/PHPar
ser.py:49:
DeprecationWarning: Using OFS.content_types is deprecated
(will be
removed in
Zope 2.11). Instead use zope.app.contenttypes.
from OFS.content_types import guess_content_type
/var/lib/zope2.9/instance/plone-site/Products/PloneWeather/_
_init__.py:5
4:
DeprecationWarning: The zLOG package is deprecated and will
be removed
in
Zope 2.11. Use the Python logging module instead.
LOG('PloneWeather',INFO, 'Installing Product')
/var/lib/zope2.9/instance/plone-site/Products/ATVocabularyMa
nager/__init
__.py:37:
DeprecationWarning: The product_name parameter of ToolInit
is deprecated
and
will be ignored in CMF 2.0: ATVocabularyManager
icon='tool.gif'
/var/lib/zope2.9/instance/plone-site/Products/CMFSquidTool/_
_init__.py:3
8:
DeprecationWarning: The product_name parameter of ToolInit
is deprecated
and
will be ignored in CMF 2.0: CMFSquidTool
icon="tool.gif",
/var/lib/zope2.9/instance/plone-site/Products/CacheSetup/con
fig.py:23:
DeprecationWarning: The zLOG package is deprecated and will
be removed
in
Zope 2.11. Use the Python logging module instead.
LOG(PROJECT_NAME, INFO, msg)
/var/lib/zope2.9/instance/plone-site/Products/PloneKeywordMa
nager/__init
__.py:44:
DeprecationWarning: The product_name parameter of ToolInit
is deprecated
and
will be ignored in CMF 2.0: PloneKeywordManager
icon='tool.gif')
{u'icon_url_name': u'skc.jpg', u'heat_index_c': u'NA',
u'image':
u'nttnttnttnt', u'heat_index_f': u'NA',
u'privacy_policy_url':
u'http://weather.gov/not
ice.html', u'weather': u'Fair', u'windchill_c':
u'NA', u'ob_url': u'http://
www.nws.noaa.gov/data/METAR/KLWM.1.txt',
u'windchill_f': u'NA', u'pressure_in': u'30.74',
u'dewpoint_string':
u'-1 F
(-18 C)', u'suggested_pickup_period': u'60',
u'disclaimer_url':
u'http://weather.gov
/disclaimer.html', u'credit': u"NOAA's National
Weather
Service", u'dewpoint_f': u'-1', u'location': u'Lawrence
Municipal
Airport,
MA', u'dewpoint_c': u'-18', u'latitude': u'42.730', '#text':
'',
u'wind_mph':
u'3.45', u'temp_f': u'35', u'station_id': u'KLWM',
u'pressure_string':
u'30.74" (1041.1 mb)', u'windchill_string': u'NA',
u'temp_c': u'2',
u'visibility_mi': u'10.00', u'wind_string': u'Variable at 3
MPH',
u'pressure_mb': u'1041.1', u'temperature_string': u'35 F (2
C)',
u'two_day_history_url':
u'http:
//www.weather.gov/data/obhistory/KLWM.html',
u'wind_dir': u'Variable', u'wind_degrees': u'999',
u'copyright_url':
u'http://weather.gov
/disclaimer.html', u'icon_url_base':
u'http://wea
ther.gov/weather/images/fcicons/', u'wind_gust_mph':
u'NA',
u'observation_time': u'Last Updated on Mar 21, 1:54 pm EDT',
u'heat_index_string': u'NA', u'longitude': u'-71.120',
u'credit_URL':
u'http://weather.gov/',
u'suggested_pickup': u'15 minutes after the
hour',
u'relative_humidity': u'21', u'observation_time_rfc822':
u'Wed, 21 Mar
2007
13:54:00 -0400 EDT'}
/var/lib/zope2.9/instance/plone-site/Products/PloneWeather/_
_init__.py:9
6:
DeprecationWarning: The product_name parameter of ToolInit
is deprecated
and
will be ignored in CMF 2.0: PloneWeather
icon='tool.gif'
/var/lib/zope2.9/instance/plone-site/Products/kupu/plone/__i
nit__.py:32:
DeprecationWarning: The product_name parameter of ToolInit
is deprecated
and
will be ignored in CMF 2.0: kupu
icon="kupu_icon.gif",
/var/lib/zope2.9/instance/plone-site/Products/CMFCore/Direct
oryView.py:5
7:
DeprecationWarning: expandpath() doesn't belong to
DirectoryView anymore
and
will be removed from that module in CMF 2.0. Please import
expandpath
from
the utils module.
DeprecationWarning)
Would any of these warnings cause the spinning?
Thanks!
Mark
------------------------------------------------------------
------------
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share
your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.p
hp?page=join.php&p=sourceforge&CID=DEVDE
V
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: Help - my plone site is spinning! |

|
2007-03-21 14:54:16 |
On 3/21/07, Mark Phillips <mark phillipsmarketing.biz>
wrote:
> Each time I restart zope on my production server, it
instantly consumes 99% of
> my cpu cycles. A little research says this is called
"spinning".
How long does this happen for? It may also be called
"starting up". ;)
Take a look at DeadlockDebugger
> I am struggling through the tutorial "Coping with
a Live Spinning Zope" at
> http://plone.org/documentation/how-to/cop
ing-with-a-live-spinning-zope. But I
> am not a Linux guru.
>
This will only help you if the site runs at least for a
while. If it
spins forever at startup, that's a different thing..
> The suggestion in the tutorial for a bandaid fix
(restarting zope each time it
> starts to spin) doesn't work for me because it starts
spinning on restart!
(a) not quite a bandaid fix, this is the approach of
google's site
reliability team
(b) how long does it take to start up? i've seen a zope take
5min to
respond. something is wrong in that case, but auto-restart
is not the
answer. when i reduced start time from 5min then
auto-restart worked
again. otherwise, it's a loop.
> If anyone can provide some other thoughts or
suggestions, they would be
> greatly appreciated! Should I upgrade to zope 2.10 or
plone 2.5.2?
zope 2.9.6 / plone 2.5.2 is my suggestion, but this probably
isn't
your problem unless you are already running a mismatch
version of
python / zope / plone. plone 2.5works on zope 2.8 and 2.9,
not quite
on 2.10.
> I am running zope 2.9 and plone 2.5.1 with just one
plone site. I get these
> warnings when I start zope:
>
> stingray:/home/mark#
/var/lib/zope2.9/instance/plone-site/bin/runzope
>
/var/lib/zope2.9/instance/plone-site/Products/Marshall/handl
ers/__init__.py:38:
> UserWarning: libxml2 not available. Unable to register
libxml2 based
> marshallers
> warnings.warn('libxml2 not available. Unable to
register libxml2 based '
>
/var/lib/zope2.9/instance/plone-site/Products/ATVocabularyMa
nager/__init__.py:8:
> DeprecationWarning: The module,
'Products.CMFCore.CMFCorePermissions' is a
> deprecated compatiblity alias for
'Products.CMFCore.permissions'; please use
> the new module instead.
> from Products.CMFCore import CMFCorePermissions
>
/var/lib/zope2.9/instance/plone-site/Products/GameEvent/__in
it__.py:16:
> DeprecationWarning: The zLOG package is deprecated and
will be removed in
> Zope 2.11. Use the Python logging module instead.
> LOG('GameEvent',INFO, 'Installing Product')
>
/var/lib/zope2.9/instance/plone-site/Products/GameEvent/__in
it__.py:25:
> DeprecationWarning: PloneUtilities is deprecated and
will be removed in Plone
> 3.0, please import from Products.CMFPlone.utils
instead.
> from Products.CMFPlone.PloneUtilities import
ToolInit
>
/var/lib/zope2.9/instance/plone-site/Products/PHParser/PHPar
ser.py:49:
> DeprecationWarning: Using OFS.content_types is
deprecated (will be removed in
> Zope 2.11). Instead use zope.app.contenttypes.
> from OFS.content_types import guess_content_type
>
/var/lib/zope2.9/instance/plone-site/Products/PloneWeather/_
_init__.py:54:
> DeprecationWarning: The zLOG package is deprecated and
will be removed in
> Zope 2.11. Use the Python logging module instead.
> LOG('PloneWeather',INFO, 'Installing Product')
>
/var/lib/zope2.9/instance/plone-site/Products/ATVocabularyMa
nager/__init__.py:37:
> DeprecationWarning: The product_name parameter of
ToolInit is deprecated and
> will be ignored in CMF 2.0: ATVocabularyManager
> icon='tool.gif'
>
/var/lib/zope2.9/instance/plone-site/Products/CMFSquidTool/_
_init__.py:38:
> DeprecationWarning: The product_name parameter of
ToolInit is deprecated and
> will be ignored in CMF 2.0: CMFSquidTool
> icon="tool.gif",
>
/var/lib/zope2.9/instance/plone-site/Products/CacheSetup/con
fig.py:23:
> DeprecationWarning: The zLOG package is deprecated and
will be removed in
> Zope 2.11. Use the Python logging module instead.
> LOG(PROJECT_NAME, INFO, msg)
>
/var/lib/zope2.9/instance/plone-site/Products/PloneKeywordMa
nager/__init__.py:44:
> DeprecationWarning: The product_name parameter of
ToolInit is deprecated and
> will be ignored in CMF 2.0: PloneKeywordManager
> icon='tool.gif')
> {u'icon_url_name': u'skc.jpg', u'heat_index_c': u'NA',
u'image':
> u'nttnttnttnt', u'heat_index_f': u'NA',
u'privacy_policy_url':
> u'http://weather.gov/not
ice.html', u'weather': u'Fair', u'windchill_c':
> u'NA', u'ob_url': u'http://
www.nws.noaa.gov/data/METAR/KLWM.1.txt',
> u'windchill_f': u'NA', u'pressure_in': u'30.74',
u'dewpoint_string': u'-1 F
> (-18 C)', u'suggested_pickup_period': u'60',
u'disclaimer_url':
> u'http://weather.gov
/disclaimer.html', u'credit': u"NOAA's National
Weather
> Service", u'dewpoint_f': u'-1', u'location':
u'Lawrence Municipal Airport,
> MA', u'dewpoint_c': u'-18', u'latitude': u'42.730',
'#text': '', u'wind_mph':
> u'3.45', u'temp_f': u'35', u'station_id': u'KLWM',
u'pressure_string':
> u'30.74" (1041.1 mb)', u'windchill_string': u'NA',
u'temp_c': u'2',
> u'visibility_mi': u'10.00', u'wind_string': u'Variable
at 3 MPH',
> u'pressure_mb': u'1041.1', u'temperature_string': u'35
F (2 C)',
> u'two_day_history_url': u'http:
//www.weather.gov/data/obhistory/KLWM.html',
> u'wind_dir': u'Variable', u'wind_degrees': u'999',
u'copyright_url':
> u'http://weather.gov
/disclaimer.html', u'icon_url_base':
> u'http://wea
ther.gov/weather/images/fcicons/', u'wind_gust_mph':
u'NA',
> u'observation_time': u'Last Updated on Mar 21, 1:54 pm
EDT',
> u'heat_index_string': u'NA', u'longitude': u'-71.120',
u'credit_URL':
> u'http://weather.gov/',
u'suggested_pickup': u'15 minutes after the hour',
> u'relative_humidity': u'21',
u'observation_time_rfc822': u'Wed, 21 Mar 2007
> 13:54:00 -0400 EDT'}
>
/var/lib/zope2.9/instance/plone-site/Products/PloneWeather/_
_init__.py:96:
> DeprecationWarning: The product_name parameter of
ToolInit is deprecated and
> will be ignored in CMF 2.0: PloneWeather
> icon='tool.gif'
>
/var/lib/zope2.9/instance/plone-site/Products/kupu/plone/__i
nit__.py:32:
> DeprecationWarning: The product_name parameter of
ToolInit is deprecated and
> will be ignored in CMF 2.0: kupu
> icon="kupu_icon.gif",
>
/var/lib/zope2.9/instance/plone-site/Products/CMFCore/Direct
oryView.py:57:
> DeprecationWarning: expandpath() doesn't belong to
DirectoryView anymore and
> will be removed from that module in CMF 2.0. Please
import expandpath from
> the utils module.
> DeprecationWarning)
Welcome to the machine. ;)
These are developer messages, i wish we could set up zope so
they only
display in debug mode or something.
> Would any of these warnings cause the spinning?
Probably not, but having a ton of add-ons load at startup
will make it
take longer for sites to load. Does your zope port ever try
to
respond at all, e.g. leave browser spinning?
--
Justin Alan Ryan
Director, Interaction Architecture
Auxilium Group, inc.: Gnudyne(tm), Qutang Networks(tm)
http://www.gnudyne.com/ |
+1-415-738-7513
"You don't lead by pointing and telling people some
place to go. You
lead by going to that place and making a case." -Ken
Kesey
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: Help - my plone site is spinning! |

|
2007-03-21 15:16:28 |
Mark Phillips wrote at 2007-3-21 12:21 -0700:
> ...
>I am struggling through the tutorial "Coping with a
Live Spinning Zope" at
>http://plone.org/documentation/how-to/cop
ing-with-a-live-spinning-zope. But I
>am not a Linux guru.
I would approach the spinning analysis on C level:
Attach "gdb" to your spinning Zope process:
gdb <your Python> <process id of your
zope>
Zope will stop and get under "gdb" control.
You then use the gdb commands
info thread -- you see a list of threads; most of the
threads will
be waiting on the GIL (all at the same
code place),
the IO thread (usually thread 1) is likely to wait
in "select" and one of the other threads is
the spinning
one
thread <thread no> -- you switch to the given
thread
backtrace -- the analyse the call stack of the selected
thread
you see a list of frames
frame <frame no> -- you switch to the given frame
(for detailed analysis)
If you are inside a frame "evalFrame" (or
similar), then the
gdb command "pfr" (see below) will tell you which
Python source code
belongs to this call frame.
This is tedious but quite successful to analyse a spinning
or hanging Zope.
Helpful commands for the analysis of Python problems on C
level.
To be put in your ".gdbinit" file.
def ps
x/s ($arg0)->ob_sval
end
def pfr
ps f->f_code->co_filename
ps f->f_code->co_name
#p f->f_lineno
lineno
end
define lineno
set $__co = f->f_code
set $__lasti = f->f_lasti
set $__sz = ((PyStringObject
*)$__co->co_lnotab)->ob_size/2
set $__p = (unsigned char *)((PyStringObject
*)$__co->co_lnotab)->ob_sval
set $__li = $__co->co_firstlineno
set $__ad = 0
while ($__sz-1 >= 0)
set $__sz = $__sz - 1
set $__ad = $__ad + *$__p
set $__p = $__p + 1
if ($__ad > $__lasti)
# break -- interpreted as "breakpoint"
set $__sz = -1
end
if ($__sz >= 0)
set $__li = $__li + *$__p
set $__p = $__p + 1
end
end
printf "%dn", $__li
end
--
Dieter
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: Help - my plone site is spinning! |
  United States |
2007-03-21 17:17:04 |
Dieter,
Awesome!
Thanks - I will work on it tonight.
Mark
On Wednesday 21 March 2007 13:16, Dieter Maurer wrote:
> Mark Phillips wrote at 2007-3-21 12:21 -0700:
> > ...
> >I am struggling through the tutorial "Coping
with a Live Spinning Zope" at
> >http://plone.org/documentation/how-to/cop
ing-with-a-live-spinning-zope.
> > But I am not a Linux guru.
>
> I would approach the spinning analysis on C level:
>
> Attach "gdb" to your spinning Zope
process:
>
> gdb <your Python> <process id of your
zope>
>
> Zope will stop and get under "gdb"
control.
>
> You then use the gdb commands
>
> info thread -- you see a list of threads; most of
the threads will
> be waiting on the GIL (all at the
same code place),
> the IO thread (usually thread 1) is likely to
wait
> in "select" and one of the other threads
is the spinning
> one
>
> thread <thread no> -- you switch to the
given thread
>
> backtrace -- the analyse the call stack of the
selected thread
> you see a list of frames
>
> frame <frame no> -- you switch to the given
frame (for detailed
> analysis)
>
> If you are inside a frame "evalFrame" (or
similar), then the
> gdb command "pfr" (see below) will tell you
which Python source code
> belongs to this call frame.
>
>
> This is tedious but quite successful to analyse a
spinning or hanging Zope.
>
>
> Helpful commands for the analysis of Python problems on
C level.
> To be put in your ".gdbinit" file.
>
> def ps
> x/s ($arg0)->ob_sval
> end
>
> def pfr
> ps f->f_code->co_filename
> ps f->f_code->co_name
> #p f->f_lineno
> lineno
> end
>
> define lineno
> set $__co = f->f_code
> set $__lasti = f->f_lasti
> set $__sz = ((PyStringObject
*)$__co->co_lnotab)->ob_size/2
> set $__p = (unsigned char *)((PyStringObject
> *)$__co->co_lnotab)->ob_sval set $__li =
$__co->co_firstlineno
> set $__ad = 0
> while ($__sz-1 >= 0)
> set $__sz = $__sz - 1
> set $__ad = $__ad + *$__p
> set $__p = $__p + 1
> if ($__ad > $__lasti)
> # break -- interpreted as "breakpoint"
> set $__sz = -1
> end
> if ($__sz >= 0)
> set $__li = $__li + *$__p
> set $__p = $__p + 1
> end
> end
> printf "%dn", $__li
> end
--
Mark Phillips
mark phillipsmarketing.biz
602 524-0376 cell
480 945-9197 fax
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: Help - my plone site is spinning! |

|
2007-03-21 17:49:35 |
On 3/21/07, Dieter Maurer <dieter handshake.de> wrote:
> Mark Phillips wrote at 2007-3-21 12:21 -0700:
> > ...
> >I am struggling through the tutorial "Coping
with a Live Spinning Zope" at
> >http://plone.org/documentation/how-to/cop
ing-with-a-live-spinning-zope. But I
> >am not a Linux guru.
>
> I would approach the spinning analysis on C level:
>
Yes, please keep in mind that the cope with a spinning Zope
tutorial
was for this situation:
* I inherited a volunteer-created Zope site which is so
old the
author must have once been friends with Jim Fulton
* It spins incessantly and takes down the shared server it
is on, as
well as bringing the site down.
* It is far cheaper to replace this antiquated code with
something I
can understand more easily, e.g. Plone, and to come up with
a solution
to keep content available to the masses in the meantime.
Also, if your Plone were to spin like this, periodically,
not on
startup, this tool could be useful *while* you track down
the problem.
Bugs should not always be even attempted to be solved at
4am when you
have a site down, but auto-restart is no permanent
solution.
It was a matter of an estimated cost about four times
greater to fix
this old site versus moving its' content into Plone, which
is much
nicer than the old ZUBB-based system which probably used ZMI
/ CMF
interface for content management.
--
Justin Alan Ryan
Director, Interaction Architecture
Auxilium Group, inc.: Gnudyne(tm), Qutang Networks(tm)
http://www.gnudyne.com/ |
+1-415-738-7513
"You don't lead by pointing and telling people some
place to go. You
lead by going to that place and making a case." -Ken
Kesey
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: Help - my plone site is spinning! |
  United States |
2007-03-21 22:30:32 |
Justin,
I did not intent to offer any insult or denigrate your
article. I have a lot
of respect for the folks who work on plone, and especially
those who take the
time to write articles such as yours. Thank you for your
time and effort for
writing the article!
At first blush, I thought the article would be about fixing
the problem. I
completely understand the rational for your approach to
solving the problem,
and I don't disagree with it. Unfortunately, since my site
was spinning at
start up, I could not use your solution.
And now back to my broken site!
Cheers!
Mark
On Wednesday 21 March 2007 15:49, Justizin wrote:
> On 3/21/07, Dieter Maurer <dieter handshake.de> wrote:
> > Mark Phillips wrote at 2007-3-21 12:21 -0700:
> > > ...
> > >I am struggling through the tutorial
"Coping with a Live Spinning Zope"
> > > at
> > > http://plone.org/documentation/how-to/cop
ing-with-a-live-spinning-zope.
> > > But I am not a Linux guru.
> >
> > I would approach the spinning analysis on C
level:
>
> Yes, please keep in mind that the cope with a spinning
Zope tutorial
> was for this situation:
>
> * I inherited a volunteer-created Zope site which is
so old the
> author must have once been friends with Jim Fulton
> * It spins incessantly and takes down the shared
server it is on, as
> well as bringing the site down.
> * It is far cheaper to replace this antiquated code
with something I
> can understand more easily, e.g. Plone, and to come up
with a solution
> to keep content available to the masses in the
meantime.
>
> Also, if your Plone were to spin like this,
periodically, not on
> startup, this tool could be useful *while* you track
down the problem.
> Bugs should not always be even attempted to be solved
at 4am when you
> have a site down, but auto-restart is no permanent
solution.
>
> It was a matter of an estimated cost about four times
greater to fix
> this old site versus moving its' content into Plone,
which is much
> nicer than the old ZUBB-based system which probably
used ZMI / CMF
> interface for content management.
--
Mark Phillips
mark phillipsmarketing.biz
602 524-0376 cell
480 945-9197 fax
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: Help - my plone site is spinning! |
  Germany |
2007-03-21 23:18:06 |
--On 21. März 2007 17:49:35 -0500 Justizin <justizin siggraph.org> wrote:
> Bugs should not always be even attempted to be solved
at 4am when you
> have a site down, but auto-restart is no permanent
solution.
Auto-restart is a perfectly working solution and I would
consider it "best
practise" when you're working with Zope. If you have
your Zopes running
behind a loadbalancer you are able to remove a restarting
Zope from the
loadbalancer before initiating the restart without having
any further
side effects for site visitors.
-aj
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: Help - my plone site is spinning! |
  United States |
2007-03-22 08:18:48 |
Dieter,
I have looked through the man page for gdb and the
documentation. I cannot
find a reference to "evalFrame". Can you let me
know what the correct
command is, or what it is supposed to do?
Thanks!
Mark
On Wednesday 21 March 2007 13:16, Dieter Maurer wrote:
> Mark Phillips wrote at 2007-3-21 12:21 -0700:
> > ...
> >I am struggling through the tutorial "Coping
with a Live Spinning Zope" at
> >http://plone.org/documentation/how-to/cop
ing-with-a-live-spinning-zope.
> > But I am not a Linux guru.
>
> I would approach the spinning analysis on C level:
>
> Attach "gdb" to your spinning Zope
process:
>
> gdb <your Python> <process id of your
zope>
>
> Zope will stop and get under "gdb"
control.
>
> You then use the gdb commands
>
> info thread -- you see a list of threads; most of
the threads will
> be waiting on the GIL (all at the
same code place),
> the IO thread (usually thread 1) is likely to
wait
> in "select" and one of the other threads
is the spinning
> one
>
> thread <thread no> -- you switch to the
given thread
>
> backtrace -- the analyse the call stack of the
selected thread
> you see a list of frames
>
> frame <frame no> -- you switch to the given
frame (for detailed
> analysis)
>
> If you are inside a frame "evalFrame" (or
similar), then the
> gdb command "pfr" (see below) will tell you
which Python source code
> belongs to this call frame.
>
>
> This is tedious but quite successful to analyse a
spinning or hanging Zope.
>
>
> Helpful commands for the analysis of Python problems on
C level.
> To be put in your ".gdbinit" file.
>
> def ps
> x/s ($arg0)->ob_sval
> end
>
> def pfr
> ps f->f_code->co_filename
> ps f->f_code->co_name
> #p f->f_lineno
> lineno
> end
>
> define lineno
> set $__co = f->f_code
> set $__lasti = f->f_lasti
> set $__sz = ((PyStringObject
*)$__co->co_lnotab)->ob_size/2
> set $__p = (unsigned char *)((PyStringObject
> *)$__co->co_lnotab)->ob_sval set $__li =
$__co->co_firstlineno
> set $__ad = 0
> while ($__sz-1 >= 0)
> set $__sz = $__sz - 1
> set $__ad = $__ad + *$__p
> set $__p = $__p + 1
> if ($__ad > $__lasti)
> # break -- interpreted as "breakpoint"
> set $__sz = -1
> end
> if ($__sz >= 0)
> set $__li = $__li + *$__p
> set $__p = $__p + 1
> end
> end
> printf "%dn", $__li
> end
--
Mark Phillips
mark phillipsmarketing.biz
602 524-0376 cell
480 945-9197 fax
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: Help - my plone site is spinning! |

|
2007-03-22 15:14:57 |
Mark Phillips wrote at 2007-3-22 06:18 -0700:
> ...
>I have looked through the man page for gdb and the
documentation. I cannot
>find a reference to "evalFrame". Can you let
me know what the correct
>command is, or what it is supposed to do?
"evalFrame" is not a GDB command.
In fact, I wrote "If you are in a frame
"evalFrame" (or similar), then you
can use "pfr" to see which Python code this frame
belongs to".
As I had today to analyse a SIGSEGV (you can use the same
technique for
post mortem analysis of a died Zope), I know by now that the
name
is more "PyEval_EvalFrame" (than
"evalFrame").
When you look down the traceback (obtained by the GDB
"bt" command),
some of the frames belong to function calls of the above
function.
In such frames, you can find out about the corresponding
Python code.
And I forgot to stress an important precondition: your
Python
must have debugging symbols included. This is the default
with
Python installations build from source. But, Python
installations
that come with your operating system are often stripped and
lack debugging information.
You probably will need to build your own Python from
source,
in case it lacks the debugging information.
--
Dieter
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
|
|