تحديد المشاكل الشائعة وحلّها
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
راجِع الأقسام التالية للحصول على المساعدة في حال واجهت أي مشاكل.
فقدان الحالة في Fleet Engine
عند استخدام Fleet Engine، صمِّم عملية التنفيذ لتوقّع حدوث أخطاء. على سبيل المثال، إذا أرسلت طلبًا إلى Fleet Engine لتعديل مركبة، قد يردّ عليك برسالة خطأ تشير إلى أنّ المركبة غير متوفّرة. بعد ذلك، يجب أن تعيد عملية التنفيذ إنشاء المركبة في الحالة الجديدة.
في سيناريو نادر جدًا لحدوث عطل كارثي في Fleet Engine، قد تحتاج إلى إعادة إنشاء معظم المركبات والمهام أو كلها. إذا أصبح معدّل الإنشاء مرتفعًا جدًا، قد يتعذّر تنفيذ بعض الطلبات مرة أخرى بسبب مشاكل في الحصة، لأنّ عمليات التحقّق من الحصة متوفّرة لتجنُّب هجمات رفض الخدمة (DOS). في هذه الحالة، عليك تقليل معدّل إعادة الإنشاء باستخدام استراتيجية التراجع عن المحاولات.
عمليات إعادة المحاولة
احرص على أن ينفّذ نظامك عمليات إعادة محاولة للطلبات إلى Fleet Engine لأنّها قد تفشل أحيانًا. تُعيد مكتبات برامج Fleet Engine لمحطات العمل المحاولة تلقائيًا.
فقدان الحالة في تطبيق السائق
في حال تعطُّل تطبيق السائق، يجب أن يعيد التطبيق إنشاء الحالة الحالية ضمن حزمة Driver SDK. يجب أن يحاول التطبيق إعادة إنشاء المهام لضمان توفّرها واستعادة حالاتها الحالية. يجب أن يعيد التطبيق أيضًا إنشاء قائمة المحطات وتحديدها بشكل صريح لحزمة تطوير البرامج (SDK) الخاصة بالسائق.
ملاحظة: يجب إجراء عمليات الاستعادة هذه بشكل مستقل بدون الاعتماد على معلومات من Fleet Engine، باستثناء الأخطاء التي تشير إلى ما إذا كان هناك عنصر متوفّر في قاعدة البيانات ومتى. إذا كان الكيان متوفّرًا، يمكن تجاهل هذا الخطأ وتعديل الكيان باستخدام رقم تعريفه.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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."]]