Giter VIP home page Giter VIP logo

Comments (10)

 avatar commented on September 20, 2024

@nakedsushi
Thank you for your comment. I could not reproduce it.
Does your MT use 3rd party's plugin or addon? If so, please disable them and check again.

from movabletype.

nakedsushi avatar nakedsushi commented on September 20, 2024

@miniuchi that's the tricky part. It's not a consistent behavior. Normally, it does not show up, but whenever I use the Data API to create a lot of entries at once (serially), after a while, creating the entries silently fail (entry is created but with blank body and title) and listing the entries shows this bug. After an undetermined amount of time, everything goes back to normal and the bug disappears.

I'm running the Amazon MT7 AMI with default settings (connected to MariaDB), memcached disabled. I wonder if there's some sort of caching going on in the perl module or a fallback when the server is overloaded.

No other plugins or addons installed.

from movabletype.

nakedsushi avatar nakedsushi commented on September 20, 2024

More clues. I wonder if it's the way starman is set up? When the bug starts happening, if I restart starman with systemctl restart movabletype.service then it goes away -- until the next time I insert a bunch of entries via the API.

[update]: Can confirm this is effected by how starman starts up. When I change the max-requests=1000 the bug shows up less frequently and if it does show up, more requests are processed before the bug shows up. Changing it from 100 to 10 will almost immediately cause the bug to show up when I start my import using the Data API. I'm not at all knowledgeable about how starman restarts workers, but I wonder if when the worker restarts after processing the max number of requests, it's failing to load everything into movable type. So a request to the Data API sometimes will hit one worker that is valid, and sometimes hit the other (recently restarted) worker with an buggy version of MT.

from movabletype.

 avatar commented on September 20, 2024

@nakedsushi
Thank you. I will investigate it again on the AMI.

from movabletype.

 avatar commented on September 20, 2024

@nakedsushi
I couldn't reproduce it on AMI... Could you give me more detail procedure to reproduce it if possible?

from movabletype.

nakedsushi avatar nakedsushi commented on September 20, 2024

Steps to reproduce:

  1. Set up /data/conf/movabletype.conf like this:
WORKER=2
MAXREQUESTS=10
  1. Restart the movabletype service with systemctl restart movabletype.service

  2. Create a script to post 1000 new entries to the DataAPI entry endpoint here: https://www.movabletype.jp/developers/data-api/v3-reference.html#entries

  3. Run the script so that it does the POST requests serially.

  4. BUG: some of the entries are correctly created, others have blank titles and bodies.

  5. BUG: after the bug above happens, try listing the entries with the list entries endpoint:
    ../mt/mt-data-api.cgi/v3/sites/SITE_ID/entries sometimes all the fields for the entries are returned and sometimes they are blank.

from movabletype.

 avatar commented on September 20, 2024

@nakedsushi
Thank you.

I tried to reproduce it with the following script and MT7 nginx AMI (t2.medium), but couldn't.
https://gist.github.com/miniuchi/3551252947985fd6dc4c5baecc306df5

I wrote this script with reference to #369 (comment).
Am I misunderstanding your procedure?

from movabletype.

nakedsushi avatar nakedsushi commented on September 20, 2024

@miniuchi You're right, I can't reproduce it now either on my AMI with your script. I'll try it again when I get back into work with my full script and see what the difference is. Thanks for working on this!

from movabletype.

nakedsushi avatar nakedsushi commented on September 20, 2024

Update: I haven't been able to consistently reproduce it with my own script. Sometimes it happens, sometimes it doesn't and setting the number of MAXREQUEST to something low like 10 sometimes works and doesn't. I'll play around with it some more and see if I can get more consistency with it.

from movabletype.

 avatar commented on September 20, 2024

@nakedsushi
Thank you for your investigation!

from movabletype.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.