Apache2 hates my Django deployment method

2022-12-10 Thread Mike Dewhirst
Server Version: Apache/2.4.52 (Ubuntu 2022.04) OpenSSL/3.0.2 
mod_wsgi/4.9.0 Python/3.10

Server MPM: event
Server Built: 2022-09-30T04:09:50

Apache *seems* to hang onto something and eventually crashes after I 
reload it after deploying a Python file.


That is either scripted (delete site and re-export from repo) or drag 
and drop a py file using Filezilla on Windows.


It *seems* ok if I redeploy html templates.

I have asked on the Apache mailing list and the consensus seems to be 
that something is "hogging" the mpm-event workers and I have to figure 
out what and solve that.


The only solution I have is to restart Apache.

I have to think this is happening in other projects so I'm wondering if 
anyone has solved this?


Thanks for any feedback

Mike

--
Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Just
ask and I'll send it to you. Your email software can handle signing.

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/768c5823-5096-000c-3e4d-c8ada5aaa210%40dewhirst.com.au.


OpenPGP_signature
Description: OpenPGP digital signature


Re: Arrayfield constraint issue in 4.1

2022-12-10 Thread James Gillard
Thanks for the feedback. I opened a ticket and it was indeed confirmed as a 
bug: https://code.djangoproject.com/ticket/34205

On Thursday, 8 December 2022 at 15:04:40 UTC Ryan Nowakowski wrote:

> Might be a bug. Check the release notes for the post 4.0.8 versions to see 
> if anything related changed. File a bug with the simplest example code that 
> demonstrates the issue.
>
>
> On December 8, 2022 6:37:52 AM CST, James Gillard  
> wrote:
>>
>> I can't yet work out whether this is a Django bug or how I'm using model 
>> constraints... Upgraded from 4.0.8 to 4.1.4 and have hit this issue when 
>> saving this model in the admin. I'd read in the release notes that these 
>> constraints would be validated on model save, and that's the code that's 
>> leading to this exception. If it's not something I've done, it seems 
>> ArrayField isn't working with this new validation of my condition. The same 
>> happens for Q(phone_numbers__len__gte=0), and the error disappears if I 
>> comment out this condition. It seems the generated code might be wrong, as 
>> I see 12 "%s" and only 11 elements in params. All it's trying to do is 
>> ensure that an empty list isn't considered unique.
>>
>> Here's the failing model:
>>
>> phone_numbers = ArrayField(models.CharField(max_length=200), 
>> default=list, blank=True)
>>
>> class Meta:
>> constraints = [
>> models.UniqueConstraint(
>>fields=['phone_numbers'],
>>condition=~Q(phone_numbers__len=0),
>>name='unique_email_phones',
>> ),
>> ]
>> )
>>
>> [image: Screenshot 2022-12-08 at 12.30.35.png]
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4a8a0941-dd65-4c22-bf16-4e11181794a0n%40googlegroups.com.