Happy to help.


On Jul 25, 11:49 am, Julien Phalip <jpha...@gmail.com> wrote:
> Thanks Jamie! Setting "verify_exists" to False did the trick. It's not
> the first time I get caught so that's a bit shameful... :/
>
> Like you say, it's worth trying the simple routes before looking at
> complicated things ;)
>
> Cheers,
>
> Julien
>
> On Jul 25, 7:19 pm, jamiecURLe <jamie.cu...@designcc.co.uk> wrote:
>
>
>
> > I always try and go do the simple routes first before assuming that
> > the problem is something complicated.
>
> > Debugging this one might be tricky if you can't recreate the effect
> > locally and I'm sure you don't want to be debugging on a live site!
>
> > Do you have anysignalsconnected to the models?  If so switch them
> > off, see what happens
>
> > How are latitude and longitude being populated - by hand or some
> > background jiggery pokery?,
>
> > What urls are going into the url field?  Try configuring them so they
> > don't go off and validate the URL (verify_exists=False) - perhaps the
> > timeout for checking the url is longer than the timeout on the proxy
> > response?
>
> > On Jul 25, 9:12 am, Julien Phalip <jpha...@gmail.com> wrote:
>
> > > Thanks a lot Jamie. Your stab in the dark is very useful indeed.
>
> > > The site is in fact hosted at Webfaction too, and it's only there that
> > > I get the error. The model is quite simple - it only has Charfields,
> > > URLFields and Emailfields. There is no inheritance, but there is a
> > > OneToOneField relationship with another model:
>
> > >     class Organisation(models.Model):
> > >         ....
>
> > >     class OrganisationExtension(models.Model):
> > >         organisation = models.OneToOneField(Organisation,
> > > related_name="extension")
> > >         latitude = models.CharField(max_length=50, blank=True,
> > > null=False)
> > >         longitude = models.CharField(max_length=50, blank=True,
> > > null=False)
>
> > > There is nocustomsave method in the models or in the admin options.
> > > The only thing I think is worth mentioning is that
> > > OrganisationExtension model is put in an inline:
>
> > >     class OrganisationExtensionInline(admin.StackedInline):
> > >         model = OrganisationExtension
> > >         max_num = 1
>
> > >     class OrganisationAdmin(admin.ModelAdmin):
> > >         inlines = [OrganisationExtensionInline]
>
> > > This looks very similar to the issue that you've had. I'm really
> > > unsure what's going on and how to debug this. I'll keep investigating,
> > > but any tips would be very welcome.
>
> > > Thanks again,
>
> > > Julien
>
> > > On Jul 25, 5:56 pm, jamiecURLe <jamie.cu...@designcc.co.uk> wrote:
>
> > > > Hello Julien,
>
> > > > Without seeing the model and knowing who your hosting provider is and
> > > > what web servers your using to serve up your django app it is
> > > > difficult to say for sure but I have a hunch.
>
> > > > It could be that the save action for that one organisation is creating
> > > > form of memory intensive situation ( possible infinite loop ), this
> > > > could eat away at available memory until the process was killed.  In
> > > > this situation the upstream web server would never get it's response
> > > > from the downstream proxy because a process on which it relied had
> > > > been killed.
>
> > > > This would give you the 502 error.
>
> > > > I have encountered this with webfaction before. It was my issue, I had
> > > > a model that had a parent > child relationship, which whilst not being
> > > > totally new to recursion, had failed to spot a real newbie error.
>
> > > > In terms of debugging this one, I'm no expert but I'd start by looking
> > > > at all relationships on the models and scrutinising them until
> > > > something came to light.
>
> > > > I'd like to say I'd then use this exact situation as a test case, but
> > > > being new to testing myself I really can't offer any real assistance
> > > > in this one.
>
> > > > Hope this stab is dark helps.
>
> > > > Cheers,
>
> > > > Jamie.
>
> > > > On Jul 24, 1:08 pm, Julien Phalip <jpha...@gmail.com> wrote:
>
> > > > > Hi,
>
> > > > > I've got a really strange error on one of my sites. There is an
> > > > > Organisation model which has a dozen of fields and 1,300 rows.
>
> > > > > Saving organisation details in the admin usually works fine except for
> > > > > one organisation. When I click 'Save', the page loads for ever and
> > > > > then it fails with a 502 Proxy Error. I can edit the corresponding row
> > > > > in Phpmyadmin without any problem so the database doesn't seem to be
> > > > > damaged. Saving works with all other organisations I've tested.
>
> > > > > It is using Django revision 9975.
>
> > > > > Would you have any tips for debugging this?
>
> > > > > Thanks a lot!
>
> > > > > Regards,
>
> > > > > Julien
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to