[okfn-labs] pyBossa newtask
Daniel Lombraña González
teleyinex at gmail.com
Mon Sep 10 07:47:46 UTC 2012
On Sat, Sep 8, 2012 at 9:46 AM, Friedrich Lindenberg <
friedrich.lindenberg at okfn.org> wrote:
> Hey Daniel,
> I'm trying to convert a little app I made a while ago into a pyBossa
> app (http://pybossa.com/app/openinterests-entitymarkup), but at the
> moment the newtask API action is prohibitively slow (1.4 minutes) - is
> there some way to speed it up?
Sure! I've been experiencing this issue too with another server. I think
that one problem that we are having right now is that PyBossa is opening a
new DB connection each time the Flask framework connects to the DB hogging
the server. Today PyBossa.com was down with the following message:
OperationalError: (OperationalError) FATAL: remaining connection slots are
reserved for non-replication superuser connections
I was going to write an e-mail about this today, but you have actually done
it for me :-) I can reproduce easily this problem when creating more that
300 tasks in a row using the API, so I need to find a solution to this
problem. Maybe it is not fully related this issue to return a task in 1.4
minutes, but today after restarting the server the Urban Parks app got a
task really fast. Can you check again?
I'll have a look too into the scheduler as I guess that something may be
broken or slowing down the code a lot.
> Also: I don't really understand why I need to check the taskId stuff
> and call newtask manually - wouldn't it be possible to wrap this
> behaviour a bit?
Sorry but I do not understand you. When you request a new task using the
endpoint newtask PyBossa will return you the task ID so you can save the
answer for that task. You don't have to actually show the Task ID of your
application in the interface. You only need to check the Task Id stuff
"manually" if you want to use the Task ID URL for example for loading the
Disquss threads. I don't know if I've make something more clear or even
worst! Please, do not hesitate and ask again if this is not clear (my Skype
account is teleyinex if you want to directly talk about this, ok?).
> - Friedrich
Por favor, NO utilice formatos de archivo propietarios para el
intercambio de documentos, como DOC y XLS, sino PDF, HTML, RTF, TXT, CSV
o cualquier otro que no obligue a utilizar un programa de un
fabricante concreto para tratar la información contenida en él.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the okfn-labs