Plone6 package install with pipx too slow

Hello all,

I would like to have your help to improve very slow install process when I run pipx cookiecutter install according to the recent official document (Install Plone from its packages – Install — Plone Documentation v6.0).

I am upgrading my Plone6 site after base system upgrade.
When I run clean install according to the official document .html, the process stacked in step 9 [9/19] Choose a Python Test Framework for over 30min.
The process also stalls at [11/19] Should we use Volto Alpha Versions.
I can finish the install after a day by periodically checking the process, but it is quite inconvenient.

This happens with my AWS M6a instance running Debian 6.1.69-1 (2023-12-30) x86_64 GNU/Linux. Before the base system upgrade, I was running Plone 6 fine with python 3.9 and Node 16, on AWS T3 instance without problem.

Meanwhile, I tested the install process on my local box with AMD Ryzen 5 5600G running Debian 6.1.66-1 (2023-12-09) x86_64 GNU/Linux, which finished quite smoothly.

Does anybody have any ideas to solve this problem?

On the other hand,

run pip/pipx with debug informations (-vv or --verbose --verbose) and you can have more info on what is going wrong. I would check also pip versions, and net firewalls also.

I can’t point out root cause, but reading your post there are multiple possible causes for these scaffolding/install delays.

First please consider using a recent Debian install like bullseye (11) or bookworm (12).

Second, consider using Python 3.11 which is the newest tested Python version for Plone 6.0

This avoids a lot of outdated certificate tooling, outdated system libraries etc and other ‘base install’ risks.

A problem we are aware of and has been solved in recent python / pip versions is an exponential delay in pip when dealing with resolving hundreds of Python packages.

Another area you can look at: the cookiecutter template scans the volto monorepo for the latest availabale release and alpha versions to download and use the matching sub scaffolding templates per Volto versio . That could be another source of delay. I’m not sure if these scripts are Python or Javascript/NodeJS based. But with a very old Debian OS Release that could be another cause for the slow downs you see.

So no single cause suggestions, but general advice is to use recent versions of all underlying dependencies including the OS.

Thank you very much yurj.

Adding -vv option to pipx run produced debugging info only before the process gets into cookiecutter templates, but did not provide details around the process I have problems with.

ipx run -vv cookiecutter gh:collective/cookiecutter-plone-starter
pipx >(setup:848): 2024-01-16 05:55:53
...

Cookiecutter Plone Starter

Sanity checks

[1/5] Python: ✓
[2/5] Node: ✓
[3/5] yo: ✓
[4/5] Docker: ✓
[5/5] git: ✓

Project details

[1/19] Project Title (Project Title):
[2/19] Project Description (A new project using Plone 6.):
[3/19] Project Slug (Used for repository id) (project-title):
[4/19] Project URL (without protocol) (project-title.example.com):
[5/19] Author (Plone Foundation):
[6/19] Author E-mail (collective@plone.org):
[7/19] Python Package Name (project_title):
[8/19] Volto Addon Name (volto-project-title):
[9/19] Choose a Python Test Framework
1 - pytest
2 - unittest
Choose from [1/2] (1):

Adding -vv to cookiecutter gave the similar result.
"pipx run cookiecutter -vv gh:collective/cookiecutter-plone-starter"

Thank you very much fredvd.

Sorry for my confusion.
My aws machine and local box both run Debian 12.4 (bookworm).
"Debian 6.1.69-1 (2023-12-30)" was what I get by running "uname -a"

I am running the cookiecutter with python 3.11.2.

I am planning to step through the cookie cutter python code with gdb, but I do not have easy way to debug JS codes.

maybe -vv has to be placed right in front of pipx command, not after run.

Thank you yurj.

Unfortunately, pipx -v run ... did not give any additional information.

Hi yurk and fredvd.

I finally found what the problem was.
It was a bad configuration of Ipv6 connection on my AWS box.

I stepped through the cookiecutter python code and found the process was stalling at cookiecutter-plone-starter/local_extensions/init.py: latest_plone() function

def latest_plone(v: str) -> str:
"""Return the latest plone version."""
url: str = "https://dist.plone.org/release/6.0-latest/constraints.txt"
resp = requests.get(url)
data = resp.content.decode("utf-8")
return re.search("\nPlone==(.*)\n", data).groups()[0]

The requests library was stalling to access the url with ipv6 address.

I checked the aws documents and found that I failed to add outgoing public route for ipv6 in the route table.

Now I can update my plone6 site.

Thank you for all your helpful input!

1 Like