No internet connection
  1. Home
  2. Issues

HIGH PRIORITY: Can't create categories

By Christian Scheuer @chrscheuer
    2021-03-17 08:07:18.024Z

    I was hoping to create a category this morning to be able to share with all of our users, but the forum creates an error.

    Last time this happened you just upped the limit, but this seems like a really bad way to fix it. Please fix this asap, since it means the announcement we had scheduled to go out to customers cannot be made, which means it may end up causing us customers.

    • 11 replies
    1. C
      Christian Scheuer @chrscheuer
        2021-03-17 08:07:24.564Z
        1. CChristian Scheuer @chrscheuer
            2021-03-17 08:07:40.205Z
            1. CChristian Scheuer @chrscheuer
                2021-03-17 08:10:08.775Z

                No matter what I set up, no matter how many permissions I remove, we're completely locked out. I'm completely unable to create the category.

                FWIW - if you can help set it up manually, we're trying to set up a category called "Getting Started" with slug "getting-started"

                1. I'll fix

                  1. CChristian Scheuer @chrscheuer
                      2021-03-17 10:15:58.166Z

                      Thanks, Magnus!

                      1. Should work now. Would you like to try?

                        1. @chrscheuer And yes, I'll make these limits dynamically configurable, and add a notice message & email when at 50% of max, so there's time to bump the limits. (And a warning message & email at 75%.)

                          1. CChristian Scheuer @chrscheuer
                              2021-03-17 11:26:42.893Z

                              Hm, I'm not sure that will help since creating new categories is such a rare occurrence.
                              Why are the limits there in the first place and why does it need to create 500+ new objects when I'm creating a category?
                              It seems to me this doesn't need dynamical limits, it needs the logic changed, so that the limits are based on what the user inputs, not on some random backend multiplication factor.
                              As a user you have no control or knowledge of why the system needs to create 500+ objects of some sort.

                              1. CChristian Scheuer @chrscheuer
                                  2021-03-17 11:28:08.223Z

                                  It worked now - thanks for the speedy fix. But I still feel for the future that the logic is wrong that you're making limits based on backend logic instead of limiting user input. Ie. make the limit so that you can only create X new categories per minute for example. But limiting based on something the user has no control over seems like a recipe for bugs/unavailability.

                                  1. Yes that's true. The reason I originally added those limits, was that I was worried that maybe an unexpected distribution of things in the database (for example, suddenly really many categories), could cause PostgreSQL to pick a dangerously slow query execution plan.

                                    But apparently that's a low risk thing, compared to the risk of running into those limits themselves.

                                    Instead, there could be automatic notifications of slow database queries, sent to the server admins. That'd work for all types of queries (not only categories and permissions).   And (like you wrote) Ty could also do rate limiting instead, of new categories etc.

                                    (Sorry b.t.w. for the new-categories-downtime)

                                    1. CChristian Scheuer @chrscheuer
                                        2021-03-17 12:03:06.399Z

                                        No worries :) Just interested in picking the best long term option so we won't run into it again :) Thanks for sharing your thoughts.

                    • Progress
                      with handling this problem
                    • @KajMagnus marked this topic as Done 2021-03-18 13:22:42.921Z.