Warning: <x> FS.syncfs operations in flight at once, probably just doing extra work

I’m getting an old game running on webGL for the first time ever, using Unity 5.5p1. So far I have everything working but the (chrome) console every 8 seconds is spitting out 3 warnings:

warning: 2 FS.syncfs operations in flight at once, probably just doing extra work
warning: 3 FS.syncfs operations in flight at once, probably just doing extra work
warning: 4 FS.syncfs operations in flight at once, probably just doing extra work

From a quick google search FS.syncfs appears to be something to do with the javascript / indexed db filesystem so presumably something is doing a file op 4x at the same time … I have no idea what that might be though, still happens after disabling save games (which use player prefs).

Has anyone seen this / have a solution for it?

1 Like

I recently built a game for webgl using 5.5 and i am getting the same warnings as soon as the unity logo appears after which it gets stuck there, if any one knows how to solve this issue it will be really appreciated.

1 Like

This warning also appears in my builds, although it doesn’t prevent me from actually using my application.

In my case I think it might have something to do with loading AssetBundles, but I haven’t verified it yet.

I worry more about warnings than actual errors, so if anyone knows something about this, I would be also be thankful to get some possible solution.

Thanks in advance :slight_smile:

1 Like

bump! getting this in a completely new game also

1 Like

This seems to be harmless, we’ll look into it though.

6 Likes

Thank you - it DOES appear to be harmless in practice but vexing to have unneeded log spam.

2 Likes

For me I think this is a symptom of another problem. I am getting random fps drops throughout the game while running a WebGL build in browser. No performance issues on mobile/PC builds

Bumping this. We’ve had it on our app for a long time, and seems like it would be helpful to get to the bottom of it.

1 Like

Bump, I’ve a feeling this is causing some performance issues. I’m only getting about 25% of the framerate of a native x86-64 build in WebGL, for a much smaller scene… Any insight would be greatly appreciated

how many “FS.syncfs operations…” warnings are you seeing? just a few or a continuous flow?

The gap in performance might be simply be caused by the fact that Unity WebGL is single-threaded at the moment.

1 Like

I have the same message (unity 2017.3)

When I start using AssetBundleManager I see much more warnings

What to do?

If everything works well, do nothing :slight_smile:

1 Like

Hi, I’m using unity 5.6.3f3 and when I run webgl build I’m getting the following warning.

warning: 2 FS.syncfs operations in flight at once, probably just doing extra work.

I’ve AI player in my game,when AI turn occurs, the warning is occured and ai player can’t take its move for this.Please help me to solve the issue.

1 Like

Hi, I have found a solution but I’m not sure I could say this is a great one, it would disable all the logging and it would only work for WebGL. Just add these lines of code before the game is instantiated.

var DEBUG = false;
if(!DEBUG){
if(!window.console) window.console = {};
var methods = [“log”, “debug”, “warn”, “info”];
for(var i=0;i<methods.length;i++){
console[methods*] = function(){};*
}
}
Source: javascript - How to quickly and conveniently disable all console.log statements in my code? - Stack Overflow
WARNING: This will completely remove all console logs, so if you have any intended clues for the game in the logs, then it would not be recommended.

2 Likes

Full code in case anyone gets confused with my answer, just replace your index.html code with this:

Unity WebGL Player | Your Title * ** ** *
* *
* *
* *
* *
* *
Your Title
* *
* *
* ** **
2 Likes

Hmmm… this seems like a nothing error all in. that said. Roll-on threading

EDIT: and yes, I have it too

I think this error is related to my game crashing in WebGL. When I do a build with No Exceptions enabled my the game crashes in the browser. When I do a build with Full Exceptions enabled this error is the first pop up and and the game loads fine. No other exceptions are thrown. Could this error cause a game to crash?

Looks like this error causing high CPU usage and my game getting slower in time. It is continuous flow at console.
“warning: 65 FS.syncfs operations in flight at once, probably just doing extra work”
Spammed this error like 60-100 times in a minute. Searched google but no luck.

Hi all, we’re seeing this issue as well in our WebGL game, using Unity 2019.2. Any progress on this issue, or a workaround we can use, @Marco-Trivellato or @Schubkraft ?

FS.syncfs() is triggered by a call that either saves or loads persistent content to IndexedDB. I am not sure exactly which all Unity APIs can trigger this, but look for a connection with PlayerPrefs, writing to disk/filesystem or asset bundles.

The warning itself is not about anything bad/incorrect happening, but it is a performance warning of redundant work that occurs - a previous save/load operation has not yet finished, but a new save/load operation is already being attempted.

5 Likes