Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Bus error, possibly from recursive call
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sylvain Hellegouarch  
View profile  
 More options Oct 17 2012, 8:26 am
From: Sylvain Hellegouarch <s...@defuze.org>
Date: Wed, 17 Oct 2012 14:26:45 +0200
Local: Wed, Oct 17 2012 8:26 am
Subject: Re: [cherrypy-users] Bus error, possibly from recursive call

Hi Eddie,

On Wed, Oct 17, 2012 at 2:19 PM, Eddie Sholl <eddie.sh...@gmail.com> wrote:
> Hi all,

> I'm quite new to cherrypy, I've been playing around with it over the last
> few weeks and enjoying the simple and minimal approach taken with the
> framework. Ive been using it for a small project of mine, which is
> primarily for running a turn based strategy game engine, and an AI for
> playing that game.

> I've run into a problem that Im having trouble investigating further. I'm
> basically just getting a 'Bus error' message in my console output, and
> everything dies at that point. The code that runs to produce the failure is
> a recursive method, and obviously thats not ideal to be running during a
> request. But my profiling and tracing suggests its only being called ~100
> times before cherrypy falls over, and its only to a max depth of 2.

I've never come across a "Bus error" issue like you've had. Could you
provide more context? What is your app, hence the bus, doing at the point
where it dies?

> So ive got a couple of questions that can help me deal with the issue.
> First of all, I was looking for a nice example of async request handling.
> The best hints so far are either the BackgroundTask or Monitor documented
> at
> http://docs.cherrypy.org/stable/refman/process/plugins/index.html#mon... really like to see an example to get my head around how to use these),
> or the wiki article http://tools.cherrypy.org/wiki/BackgroundTaskQueue.
> Is this how I should proceed to shift the load of my game AI out of a
> straight synchronous request handler?

If you don't mind threads and having everything within your main Python
process, those are great. If you want something more distributed you could
look at writing a plugin interfacing celery [1] or something similar.

You could get some inspiration from some recipes I wrote [2].

[1] http://celeryproject.org/
[2]
https://bitbucket.org/Lawouach/cherrypy-recipes/src/c899e1b914171d3c3...

--
- Sylvain
http://www.defuze.org
http://twitter.com/lawouach


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.