פתרון בעיות נפוצות
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אם נתקלתם בבעיות, תוכלו לקבל עזרה בקטעים הבאים.
מצב אבוד ב-Fleet Engine
כשעובדים עם Fleet Engine, חשוב לתכנן את ההטמעה כך שתהיה עמידה בפני כשלים. לדוגמה, אם שולחים בקשה ל-Fleet Engine לעדכן רכב, יכול להיות שהמערכת תגיב בשגיאה שמציינת שהרכב לא קיים. לאחר מכן, ההטמעה צריכה ליצור מחדש את הרכב במצב החדש.
בתרחיש לא סביר של כשל קטסטרופלי ב-Fleet Engine, יכול להיות שתצטרכו ליצור מחדש את רוב כלי הרכב והמשימות או את כולם. אם קצב היצירה יהיה גבוה מדי, יכול להיות שחלק מהבקשות ייכשלו שוב בגלל בעיות במכסה, כי יש בדיקות מכסה כדי למנוע מתקפות מניעת שירות (DOS). במקרה כזה, צריך להאט את קצב היצירה מחדש באמצעות אסטרטגיית השהיה לפני ניסיון חוזר (backoff) לניסיונות חוזרים.
ניסיונות חוזרים
חשוב לוודא שהמערכת שלכם מטמיעה ניסיונות חוזרים לבקשות אל Fleet Engine, כי יכול להיות שהן ייכשלו מדי פעם. ספריות הלקוח של Fleet Engine מנסות לבצע שוב את הפעולה כברירת מחדל.
מצב לא שמור באפליקציית הנהגים
אם אפליקציית הנהג קורסת, האפליקציה צריכה ליצור מחדש את המצב הנוכחי ב-Driver SDK. האפליקציה צריכה לנסות ליצור מחדש את המשימות כדי לוודא שהן קיימות ולשחזר את המצבים הנוכחיים שלהן. בנוסף, האפליקציה צריכה ליצור מחדש את רשימת התחנות של Driver SDK ולהגדיר אותה באופן מפורש.
הערה: השחזורים האלה צריכים להתבצע באופן אוטונומי, בלי להסתמך על מידע מ-Fleet Engine, למעט שגיאות שמציינות אם יש כבר ישות במסד הנתונים ומתי היא נוצרה. אם הישות כבר קיימת, אפשר להתעלם מהשגיאה ולעדכן את הישות באמצעות המזהה שלה.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-09-05 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-09-05 (שעון UTC)."],[[["\u003cp\u003eFleet Engine implementations should be designed to handle failures and potential data loss by recreating vehicles and tasks when necessary.\u003c/p\u003e\n"],["\u003cp\u003eIn case of Fleet Engine failures, use a backoff strategy to manage the recreation rate and avoid quota issues.\u003c/p\u003e\n"],["\u003cp\u003eImplement retries for Fleet Engine requests to address occasional failures, leveraging client library defaults or custom mechanisms.\u003c/p\u003e\n"],["\u003cp\u003eDriver apps should autonomously restore state after crashes by recreating tasks and stops within the Driver SDK, relying on error handling for existing entities.\u003c/p\u003e\n"]]],["Implement error handling for Fleet Engine failures, such as vehicle non-existence, by recreating entities. In catastrophic failures, recreate vehicles and tasks, using a backoff strategy if quota issues arise. Implement request retries, as provided by Fleet Engine client libraries. If the driver app crashes, autonomously recreate tasks and stop lists within the Driver SDK, relying only on Fleet Engine errors to determine if entities already exist for update purposes.\n"],null,["# Troubleshoot common issues\n\nCheck the following sections for help if you experience any issues.\n\nLost state in Fleet Engine\n--------------------------\n\nWhen working with Fleet Engine, design your implementation to anticipate\nfailures. For example, if you issue a request to Fleet Engine to update a\nvehicle, it might respond with an error indicating that the vehicle does not\nexist. Your implementation should then recreate the vehicle in the new state.\n\nIn the extremely unlikely scenario of a catastrophic failure of Fleet Engine,\nyou may need to recreate most or all vehicles and tasks. If the creation rate\nbecomes too high, some requests may fail again due to quota issues since quota\nchecks are in place to avoid denial of service (DOS) attacks. In this case, slow\ndown the recreation rate using a backoff strategy for reattempts.\n\n### Retries\n\nBe sure your system implements retries for requests to Fleet Engine since they\nmight fail occasionally. Fleet Engine client libraries issue retries by default.\n\nLost state in the driver app\n----------------------------\n\nIf the driver app crashes, the app must recreate the current state within the\nDriver SDK. The app should attempt to recreate tasks to ensure that they exist\nand to restore their current states. The app should also recreate and explicitly\nset the list of stops for the Driver SDK.\n\n**Note**: These restorations must be done autonomously without relying on\ninformation from Fleet Engine, other than errors indicating if and when an\nentity already exists in the database. If an entity does already exist, then\nthat error can be absorbed and the entity can be updated using its ID."]]