Page loading problems

PennController for IBEX Forums Support Page loading problems

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #5244
    asdf
    Participant

    Hi Jeremy,

    I’m using this platform to collect audio data and everything works fine when setting up the experiment. But after I distributed the experiment url to my participants, many of them reported that it almost took forever to load the page, both when getting into the starting page and between trials. I think the problem probably lies in PCIbex’s server itself, not in the server I rent to host audio data. Cause if it is the problem of my own server, the problem should occur only at the very end of the experiment when uploading the data.

    This problem never happened before when I run the experiment on the original IbexFarm. So I’m wondering if this is because the server of PCIbex is smaller than the original IbexFarm’s, which makes PCIbex’s server hard to handle the audio recording experiment? Is it possible to solve this page-loading problem by transitioning the experiment to the original IbexFarm platform?

    Also, during the experiment setup, when I tried to save the change I edited, it always failed to save the change. This happened to almost all the time, and I have to click the “save change” button many times before the change is successfully saved. I’m wondering if this bug is related to the page-loading problem that I currently have?

    #5249
    Jeremy
    Keymaster

    Hi,

    Yes, the two are somehow related. PCIbex’s servers are very slow these days, because the configuration is not ideal. I should reset them at some point, but that means that they will go down for some time, halting any ongoing data collection, that’s why I’ve been postponing it.

    One difference between the Ibex and the PCIbex Farm is that the former cannot host multimedia resources, while the latter can. Each time your experiment fetches an image/audio/video file, it sends a request to the server. The more multimedia files in your experiment, and the more participants and experiments are run at the same time, the more requests must be processed in parallel by the server. This is one reason why the Ibex Farm is usually faster than the PCIbex Farm.

    If you’re already using your own server to save the collected audio samples, I’d suggest you host all your multimedia resources there if that’s not already the case. I also recommend you compress them all in a single ZIP file, so that your experiment sends only one global request instead of one per audio/image/video file. Note that I had participants experience serious slowdowns before on the original Ibex Farm because my experiment was sending many requests for resource files to an external server.

    One workaround when updating your scripts is to edit them locally and upload them to your project, instead of using the online editor on the farm.

    I apologize for the inconvenience and will try to get the new PCIbex Farm up soon

    Jeremy

    #5253
    asdf
    Participant

    So would you suggest me to switch to the original Ibex or stay in the current PCIbex? Does hosting all the multimedia files on an external server make PCIbex work as fast as the original Ibex? Or the original Ibex would still work faster than PCIbex because of the server configuration?

    Also, may I have an idea of when the server reset of PCIbex will be performed and completed?

    #5254
    Jeremy
    Keymaster

    At the moment, the original Ibex servers are probably faster than the PCIbex ones, and migrating from one to the other is straightforward if you make your experiment on a git project on GitLab or GitHub: just hit Sync on either Farm and you’ll have your project up and running there.

    Compressing all the multimedia files into one zip archive and hosting it on an external server (with a secure domain, which you should already have since you collect audio recordings, but see this page) will definitely help, regardless of where your experiment itself is hosted.

    I can’t give an estimate for the server reset because I haven’t scheduled one yet. The whole process usually takes less than an hour. I will post a message on the forums once I schedule the reset.

    Jeremy

    #5276
    asdf
    Participant

    Hi Jeremy,

    I’ve transitioned all my experiment materials to the server I rent and tried to fetch them using PreloadZip at the very beginning of the experiment. But there are two problems I met:

    1. It seems like Ibex tries to fetch materials in each trial instead of at the very beginning of the whole experiment.
    2. The experiment materials are not successfully fetched. Images are not displayed and audios are not played.

    I think I’ve strictly followed the instruction on the link you posted above for “zipped resources”. Zip files and .htaccess are in the same folder; all the expt materials are at the root of the zip file; a PreloadZip function is added in the script right after “PennController.ResetPrefix(null);”.

    Are there any other possible sources of this error?

    #5277
    Jeremy
    Keymaster

    Hi,

    The two problems are related: if PennController succeeds in fetching the zip archive, it should rapidly preload all the resources it contains in the cache and thus no longer need to look for them at the beginning of each trial.

    It’s possible that you don’t have the privileges to use .htaccess to configure CORS settings on your server, or maybe it’s doesn’t run apache. Would you mind sharing the link to your experiment with me (you can email it to me if you don’t want to post it here)? Just make sure to re-enable the Debug feature in case you turned it off before

    Jeremy

    #5278
    asdf
    Participant

    Thank you so much! May I have your email address so that I can send you the experiment link?

    #5280
    Jeremy
    Keymaster

    You can use support@pcibex.net, your message will only be forwarded to me and Florian

    EDIT: problem solved, there was a typo in the URL to the ZIP file

    Jeremy

    #5282
    asdf
    Participant

    Hi Jeremy,

    Something strange happened. When the experiment ends, there’s always an error message popped up as “There was an error uploading the recordings().” But I checked my server, the audio data has already been successfully uploaded. The results file in Ibex has also recorded the log of the experiment, but in the “UploadRecordings” part the status is recorded as “failed”.

    #5283
    Jeremy
    Keymaster

    Hi,

    Strange indeed. It probably has something to do with your server’s response: I suspect that it is fine with accepting and processing the upload request, but for some reason it probably does not send the OK back to your experiment. Did you copy the full script from this page to your setup.php?

    Jeremy

    #5284
    asdf
    Participant

    Oh it’s because I forgot to change the name of the domain in php file when transfer from PCIbex to the original Ibex. Thank you so much for reminding me of checking the php file!

    #5302
    asdf
    Participant

    Hi Jeremy,

    I’m wondering if there’s a maximum limit of loading time for the PreloadZip function? If so, can I raise that maximum limit a little bit since the size of the experiment materials I have is a little bit large?

    #5303
    Jeremy
    Keymaster

    Hi,

    The function PreloadZip tells your experiment to download a ZIP file and uncompress its files into the browser’s cache so your trials can look up for resources there, but technically it doesn’t really control loading time. What you can do to control preloading time though is use CheckPreloaded to create a trial that will wait until resources are preloaded, or a delay is over, before proceeding:

    PennController.ResetPrefix(null)
    
    PreloadZip("https://.../.../myArchive.zip")
    
    Sequence("intro", "preload", /* ... */ )
    
    newTrial( "intro",
      newButton("Welcome. Click here to proceed.").print().wait() 
    )
    
    CheckPreloaded( 5 * 60 * 1000 ) // wait for up to 5 minutes
        .label("preload")
    
    // rest of your experiment

    Jeremy

    #5304
    asdf
    Participant

    The problem that I currently have is that for many participants, it may take around 5 mins to download the experiment materials from my server. On the one hand, I would definitely further compress the files to a more reasonable size. But I’m wondering if such a long loading time would choke the IbexFarm and lead to the failure of expt loading that most of my participants have met?

    #5305
    Jeremy
    Keymaster

    Since you’re hosting your ZIP file outside the Ibex Farm, it shouldn’t affect it at all. What will happen however is that, whenever you reach a trial whose resources have not been preloaded yet, PennController will give it another 2 minutes (if I remember correctly) before starting the trial. If the resources are still not preloaded after those two minutes, the trial will start anyway: if you have a wait on an Audio element whose file did not preload, then your trial will never end.

    If your design has a multi-part structure, you could consider splitting your resources across as many archive files as you have parts, and insert CheckPreloaded before a part (specifying the corresponding label-s) to only check for its resources.

    Jeremy

Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.